Si on suit les considérations du domain-driven design, le fait qu'on réfère toustes à cette partie du code comme `le frontend` me pousse à renommer le package pour mieux réflèter notre utilisation. Ça devrait rendre plus évident où les fichiers sources du frontend sont situés.
24 lines
518 B
Docker
24 lines
518 B
Docker
FROM golang:1.24 AS build
|
|
|
|
ARG agecem_org_version
|
|
|
|
LABEL author="Victor Lacasse-Beaudoin <vlbeaudoin@agecem.org>"
|
|
|
|
WORKDIR /go/src/app
|
|
|
|
COPY go.mod go.sum LICENSE ./
|
|
ADD cmd/ cmd/
|
|
ADD frontend/ frontend/
|
|
ADD pkg/ pkg/
|
|
|
|
RUN CGO_ENABLED=0 go build -a -o agecem-org \
|
|
-ldflags="-X 'git.agecem.com/agecem/agecem-org/pkg/agecemorg/version.version=$agecem_org_version'" \
|
|
./cmd/agecemorg/
|
|
|
|
# Alpine
|
|
|
|
FROM alpine:3.21 AS run
|
|
|
|
COPY --from=build /go/src/app/agecem-org /usr/bin/agecem-org
|
|
|
|
CMD ["agecem-org", "server"]
|