mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Add option to provide configuration file on command line
This commit is contained in:
@@ -55,6 +55,7 @@ and it takes care of all the other things for you`,
|
||||
Action: runWeb,
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{"port, p", "3000", "Temporary port number to prevent conflict", ""},
|
||||
cli.StringFlag{"config, c", "custom/conf/app.ini", "Configuration file", ""},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -165,6 +166,9 @@ func newMacaron() *macaron.Macaron {
|
||||
}
|
||||
|
||||
func runWeb(ctx *cli.Context) {
|
||||
if ctx.IsSet("config") {
|
||||
setting.CustomConf = ctx.String("config")
|
||||
}
|
||||
routers.GlobalInit()
|
||||
checkVersion()
|
||||
|
||||
|
Reference in New Issue
Block a user