diff --git a/Dockerfile b/Dockerfile index f97af4e..a34c499 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,4 +53,6 @@ VOLUME ["/data"] HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD ["/tinyauth/tinyauth", "healthcheck"] +ENV GIN_MODE=release + ENTRYPOINT ["/tinyauth/tinyauth"] \ No newline at end of file diff --git a/Dockerfile.distroless b/Dockerfile.distroless index be00998..146792f 100644 --- a/Dockerfile.distroless +++ b/Dockerfile.distroless @@ -53,4 +53,6 @@ VOLUME ["/data"] HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD ["/tinyauth/tinyauth", "healthcheck"] +ENV GIN_MODE=release + ENTRYPOINT ["/tinyauth/tinyauth"] \ No newline at end of file diff --git a/internal/bootstrap/app_bootstrap.go b/internal/bootstrap/app_bootstrap.go index 5f9b906..d3dbfc2 100644 --- a/internal/bootstrap/app_bootstrap.go +++ b/internal/bootstrap/app_bootstrap.go @@ -172,10 +172,6 @@ func (app *BootstrapApp) Setup() error { } // Create engine - if config.Version != "development" { - gin.SetMode(gin.ReleaseMode) - } - engine := gin.New() if len(app.config.TrustedProxies) > 0 {