Skip to content

Commit c6b2b31

Browse files
committed
fix: set gin mode to release using env
1 parent ae6940c commit c6b2b31

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ VOLUME ["/data"]
3636

3737
USER tinyauth-analytics
3838

39+
ENV GIN_MODE=release
40+
3941
ENTRYPOINT ["./tinyauth-analytics"]

main.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@ func main() {
6969

7070
cacheSvc := service.NewCacheService()
7171

72-
if version != "development" {
73-
gin.SetMode(gin.ReleaseMode)
74-
}
75-
7672
engine := gin.Default()
7773

7874
engine.SetTrustedProxies(strings.Split(trustedProxies, ","))

0 commit comments

Comments
 (0)