2023-11-13 17:28:30 -05:00
|
|
|
FROM golang:1.21.4 AS build
|
2023-11-13 16:49:20 -05:00
|
|
|
|
|
|
|
ARG agecem_org_version
|
2023-02-17 17:28:47 -05:00
|
|
|
|
2023-03-28 02:42:44 -04:00
|
|
|
LABEL author="Victor Lacasse-Beaudoin <vlbeaudoin@agecem.org>"
|
2023-02-17 17:28:47 -05:00
|
|
|
|
|
|
|
WORKDIR /go/src/app
|
|
|
|
|
2023-03-28 02:35:42 -04:00
|
|
|
COPY go.mod go.sum main.go ./
|
2023-02-17 17:28:47 -05:00
|
|
|
|
2023-03-21 18:37:51 -04:00
|
|
|
ADD public/ public/
|
2023-02-23 04:24:04 -05:00
|
|
|
|
2023-03-28 02:35:42 -04:00
|
|
|
ADD cmd/ cmd/
|
|
|
|
|
2023-04-26 16:51:13 -04:00
|
|
|
ADD api/ api/
|
|
|
|
|
2023-08-20 16:21:44 -04:00
|
|
|
ADD api_handlers/ api_handlers/
|
|
|
|
|
2023-10-24 17:39:15 -04:00
|
|
|
ADD apiresponse/ apiresponse/
|
|
|
|
|
2023-07-04 16:22:00 -04:00
|
|
|
ADD config/ config/
|
2023-07-04 16:05:23 -04:00
|
|
|
|
2023-07-04 16:47:03 -04:00
|
|
|
ADD media/ media/
|
|
|
|
|
2023-08-19 14:48:08 -04:00
|
|
|
ADD models/ models/
|
|
|
|
|
2023-07-04 21:57:13 -04:00
|
|
|
ADD templates/ templates/
|
|
|
|
|
2023-11-13 16:49:20 -05:00
|
|
|
ADD version/ version/
|
|
|
|
|
2023-08-20 16:21:44 -04:00
|
|
|
ADD web_handlers/ web_handlers/
|
2023-07-24 14:28:55 -04:00
|
|
|
|
2023-10-24 17:55:07 -04:00
|
|
|
Add webresponse/ webresponse/
|
|
|
|
|
2023-11-13 16:49:20 -05:00
|
|
|
RUN CGO_ENABLED=0 go build -a -o agecem-org -ldflags="-X 'git.agecem.com/agecem/agecem-org/version.version=$agecem_org_version'" .
|
2023-02-17 17:28:47 -05:00
|
|
|
|
|
|
|
# Alpine
|
|
|
|
|
2023-11-13 17:28:30 -05:00
|
|
|
FROM alpine:3.18.4 AS run
|
2023-02-17 17:28:47 -05:00
|
|
|
|
2023-03-22 16:16:02 -04:00
|
|
|
COPY --from=build /go/src/app/agecem-org /usr/bin/agecem-org
|
2023-02-17 17:28:47 -05:00
|
|
|
|
2023-03-28 02:35:42 -04:00
|
|
|
CMD ["agecem-org", "server"]
|