Enable gin release mode outside dev
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m53s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-11 00:38:44 +01:00
parent 1d472d382b
commit 34934e7d13
2 changed files with 5 additions and 0 deletions

View File

@@ -28,6 +28,10 @@ func main() {
} }
gin.DefaultWriter = io.MultiWriter(os.Stdout, logFile) gin.DefaultWriter = io.MultiWriter(os.Stdout, logFile)
if os.Getenv("DEV_MODE") != "true" {
gin.SetMode(gin.ReleaseMode)
}
r := gin.Default() r := gin.Default()
err = r.SetTrustedProxies([]string{"172.28.0.0/16"}) err = r.SetTrustedProxies([]string{"172.28.0.0/16"})

View File

@@ -11,6 +11,7 @@ services:
- SPOTIFY_REDIRECT_URI=https://localhost/api/spotify/callback - SPOTIFY_REDIRECT_URI=https://localhost/api/spotify/callback
- GQL_PLAYGROUND=true - GQL_PLAYGROUND=true
- GQL_INTROSPECTION=true - GQL_INTROSPECTION=true
- DEV_MODE=true
nginx: nginx:
environment: environment:
- DEV_MODE=true - DEV_MODE=true