Add Dockerfile (#16)

Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/16
Co-authored-by: hiifong <f@ilo.nz>
Co-committed-by: hiifong <f@ilo.nz>
This commit is contained in:
hiifong
2025-04-06 04:54:56 +00:00
committed by hiifong
parent afada4435e
commit e3307adbdf
3 changed files with 7 additions and 0 deletions

View File

@@ -80,6 +80,8 @@ func init() {
flagPkg.Token = os.Getenv("GITEA_ACCESS_TOKEN")
}
flagPkg.Mode = transport
if debug {
flagPkg.Debug = debug
}

View File

@@ -5,6 +5,7 @@ var (
Port int
Token string
Version string
Mode string
Debug bool
)

View File

@@ -39,6 +39,10 @@ func Default() *zap.Logger {
MaxAge: 30,
}))
if flag.Mode == "sse" {
wss = append(wss, zapcore.AddSync(os.Stdout))
}
ws = zapcore.NewMultiWriteSyncer(wss...)
enc := zapcore.NewConsoleEncoder(ec)