Move GIN_MODE=release from build args to runtime environment variable
This commit is contained in:
@@ -13,7 +13,7 @@ RUN go mod download
|
||||
COPY cmd /app/cmd/
|
||||
COPY internal /app/internal/
|
||||
|
||||
RUN GIN_MODE=release CGO_ENABLED=1 GOOS=linux go build -o /CatsOfMastodonGo ./cmd/CatsOfMastodonBotGo/main.go
|
||||
RUN CGO_ENABLED=1 GOOS=linux go build -o /CatsOfMastodonGo ./cmd/CatsOfMastodonBotGo/main.go
|
||||
|
||||
# Deploy the application binary into a lean image
|
||||
FROM gcr.io/distroless/base-debian12 AS build-release-stage
|
||||
@@ -26,5 +26,6 @@ COPY --from=build-stage /app/internal/web/templates /internal/web/templates
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENV GIN_MODE=release
|
||||
|
||||
ENTRYPOINT ["/CatsOfMastodonGo"]
|
Reference in New Issue
Block a user