From 3cacec916308a350b2c801129f550d46c28dfd49 Mon Sep 17 00:00:00 2001 From: Rodrigo Saboya Date: Wed, 9 Mar 2016 22:53:42 -0300 Subject: [PATCH 1/2] Making AppDataPath customizable. --- modules/setting/setting.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/setting/setting.go b/modules/setting/setting.go index dcee488e70..5d117be41f 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -54,7 +54,7 @@ var ( AppSubUrl string AppSubUrlDepth int // Number of slashes AppPath string - AppDataPath = "data" + AppDataPath string // Server settings Protocol Scheme @@ -334,6 +334,7 @@ func NewContext() { OfflineMode = sec.Key("OFFLINE_MODE").MustBool() DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool() StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(workDir) + AppDataPath = sec.Key("APP_DATA_PATH").MustString("data") EnableGzip = sec.Key("ENABLE_GZIP").MustBool() switch sec.Key("LANDING_PAGE").MustString("home") { From 2c626371b0f8240827f0450e69afca99d209eb4d Mon Sep 17 00:00:00 2001 From: Rodrigo Saboya Date: Wed, 9 Mar 2016 23:16:43 -0300 Subject: [PATCH 2/2] Adding APP_DATA_PATH entry to the default app.ini. --- conf/app.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/app.ini b/conf/app.ini index ed864f2695..419e25ea7f 100644 --- a/conf/app.ini +++ b/conf/app.ini @@ -93,6 +93,8 @@ KEY_FILE = custom/https/key.pem ; Upper level of template and static file path ; default is the path where Gogs is executed STATIC_ROOT_PATH = +; Default path for App data +APP_DATA_PATH = data ; Application level GZIP support ENABLE_GZIP = false ; Landing page for non-logged users, can be "home" or "explore"