refactor: set gin mode using env

This commit is contained in:
Stavros
2025-10-08 16:24:14 +03:00
parent 287c6f975f
commit c77da30d87
3 changed files with 4 additions and 4 deletions

View File

@@ -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"]

View File

@@ -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"]

View File

@@ -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 {