Victor Lacasse-Beaudoin
28cc97dcee
Ajouter data/ Ajouter data/ à Dockerfile Ajouter flags pour server.port et server.documents.* Ajouter viper Ajouter example de config à examples/config/ Exécuter serveur sur port custom (8080 par défaut) Retirer copyright notice de main.go Cleanup dependencies (go get, go mod tidy) Ajouter /v1/health Ajouter container minio à docker-compose
27 lines
441 B
Docker
27 lines
441 B
Docker
FROM golang:1.20.2 as build
|
|
|
|
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 data/ data/
|
|
|
|
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o agecem-org .
|
|
|
|
# Alpine
|
|
|
|
FROM alpine:3.17.2
|
|
|
|
RUN apk update && apk upgrade --no-cache
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=build /go/src/app/agecem-org /usr/bin/agecem-org
|
|
|
|
CMD ["agecem-org", "server"]
|