From 593d32438a8126c07b41f74afe6404160431f7f1 Mon Sep 17 00:00:00 2001 From: Mohammad Mahdi Date: Thu, 5 Jun 2025 18:47:01 +0330 Subject: [PATCH] Set GIN_MODE to release during build for production environment --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1e342ef..7c76d72 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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