16 lines
453 B
Docker
16 lines
453 B
Docker
FROM gitea.pena/penadevops/container-images/golang:main as build
|
|
WORKDIR /app
|
|
COPY . .
|
|
RUN apk add git
|
|
RUN go mod download
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ans ./main.go
|
|
|
|
FROM gitea.pena/penadevops/container-images/alpine:main
|
|
COPY --from=build /app/ans .
|
|
EXPOSE 1490
|
|
ENV IS_PROD_LOG=false
|
|
ENV IS_PROD=false
|
|
ENV PORT=1490
|
|
ENV PG_CRED="host=postgres port=5432 user=squiz password=Redalert2 dbname=squiz sslmode=disable"
|
|
CMD ["/ans"]
|