1
1
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:
Peter Smit
2015-02-05 12:12:37 +02:00
parent 02c5bade0f
commit 1ab09e4f1b
8 changed files with 37 additions and 13 deletions

View File

@@ -26,10 +26,14 @@ It can be used for backup and capture Gogs server image to send to maintainer`,
Action: runDump,
Flags: []cli.Flag{
cli.BoolFlag{"verbose, v", "show process details", ""},
cli.StringFlag{"config, c", "custom/conf/app.ini", "Configuration file", ""},
},
}
func runDump(ctx *cli.Context) {
if ctx.IsSet("config") {
setting.CustomConf = ctx.String("config")
}
setting.NewConfigContext()
models.LoadModelsConfig()
models.SetEngine()