Set GIN_MODE to release during build for production environment

This commit is contained in:
2025-06-05 18:47:01 +03:30
parent 22adcee9d2
commit 593d32438a

View File

@@ -13,7 +13,7 @@ RUN go mod download
COPY cmd /app/cmd/
COPY internal /app/internal/
RUN CGO_ENABLED=1 GOOS=linux go build -o /CatsOfMastodonGo ./cmd/CatsOfMastodonBotGo/main.go
RUN GIN_MODE=release 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