mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 12:45:47 +00:00
refactor: set gin mode using env
This commit is contained in:
@@ -53,4 +53,6 @@ VOLUME ["/data"]
|
|||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD ["/tinyauth/tinyauth", "healthcheck"]
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD ["/tinyauth/tinyauth", "healthcheck"]
|
||||||
|
|
||||||
|
ENV GIN_MODE=release
|
||||||
|
|
||||||
ENTRYPOINT ["/tinyauth/tinyauth"]
|
ENTRYPOINT ["/tinyauth/tinyauth"]
|
||||||
@@ -53,4 +53,6 @@ VOLUME ["/data"]
|
|||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD ["/tinyauth/tinyauth", "healthcheck"]
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD ["/tinyauth/tinyauth", "healthcheck"]
|
||||||
|
|
||||||
|
ENV GIN_MODE=release
|
||||||
|
|
||||||
ENTRYPOINT ["/tinyauth/tinyauth"]
|
ENTRYPOINT ["/tinyauth/tinyauth"]
|
||||||
@@ -172,10 +172,6 @@ func (app *BootstrapApp) Setup() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create engine
|
// Create engine
|
||||||
if config.Version != "development" {
|
|
||||||
gin.SetMode(gin.ReleaseMode)
|
|
||||||
}
|
|
||||||
|
|
||||||
engine := gin.New()
|
engine := gin.New()
|
||||||
|
|
||||||
if len(app.config.TrustedProxies) > 0 {
|
if len(app.config.TrustedProxies) > 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user