agecem-org/Dockerfile
Victor Lacasse-Beaudoin 7bf489315e feat(api): add pave spec to route /v1/spec and add seed to it
Exposes the API spec in pave format, which intends to show information
about all API routes.

Also pave V1SeedPOST and V1SpecGET
2023-11-20 15:13:42 -05:00

45 lines
740 B
Docker

FROM golang:1.21.4 AS build
ARG agecem_org_version
LABEL author="Victor Lacasse-Beaudoin <vlbeaudoin@agecem.org>"
WORKDIR /go/src/app
COPY go.mod go.sum main.go ./
ADD public/ public/
ADD cmd/ cmd/
ADD api/ api/
ADD apihandler/ apihandler/
ADD apirequest/ apirequest/
ADD apiresponse/ apiresponse/
ADD config/ config/
ADD media/ media/
ADD models/ models/
ADD templates/ templates/
ADD version/ version/
ADD webhandler/ webhandler/
Add webresponse/ webresponse/
RUN CGO_ENABLED=0 go build -a -o agecem-org -ldflags="-X 'git.agecem.com/agecem/agecem-org/version.version=$agecem_org_version'" .
# Alpine
FROM alpine:3.18.4 AS run
COPY --from=build /go/src/app/agecem-org /usr/bin/agecem-org
CMD ["agecem-org", "server"]