mirror of
https://github.com/grassrootseconomics/farmstar-survey-backend.git
synced 2024-11-16 07:16:47 +01:00
28 lines
539 B
Docker
28 lines
539 B
Docker
|
FROM golang:1-bookworm as build
|
||
|
|
||
|
ENV CGO_ENABLED=0
|
||
|
ENV GOOS=linux
|
||
|
ENV GOARCH=amd64
|
||
|
|
||
|
WORKDIR /build
|
||
|
|
||
|
COPY go.* .
|
||
|
RUN go mod download
|
||
|
|
||
|
COPY . .
|
||
|
RUN go build -o farmstar-survey-backend -ldflags="-s -w" cmd/farmstar/*.go
|
||
|
|
||
|
FROM debian:bookworm-slim
|
||
|
|
||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||
|
|
||
|
WORKDIR /service
|
||
|
|
||
|
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||
|
COPY --from=build /build/farmstar-survey-backend .
|
||
|
COPY LICENSE .
|
||
|
COPY config.toml .
|
||
|
|
||
|
EXPOSE 8090
|
||
|
|
||
|
CMD ["/service/farmstar-survey-backend", "serve", "--http=0.0.0.0:8090"]
|