Merge pull request #299811 from emilylange/forgejo-static-root-path
forgejo: fix applying of our `STATIC_ROOT_PATH` patch
This commit is contained in:
commit
a0efbcae77
|
@ -59,11 +59,11 @@ buildGoModule rec {
|
||||||
buildInputs = lib.optional pamSupport pam;
|
buildInputs = lib.optional pamSupport pam;
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./../gitea/static-root-path.patch
|
./static-root-path.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace modules/setting/setting.go --subst-var data
|
substituteInPlace modules/setting/server.go --subst-var data
|
||||||
'';
|
'';
|
||||||
|
|
||||||
tags = lib.optional pamSupport "pam"
|
tags = lib.optional pamSupport "pam"
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/modules/setting/server.go b/modules/setting/server.go
|
||||||
|
index 183906268..fa02e8915 100644
|
||||||
|
--- a/modules/setting/server.go
|
||||||
|
+++ b/modules/setting/server.go
|
||||||
|
@@ -319,7 +319,7 @@ func loadServerFrom(rootCfg ConfigProvider) {
|
||||||
|
OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
|
||||||
|
Log.DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool()
|
||||||
|
if len(StaticRootPath) == 0 {
|
||||||
|
- StaticRootPath = AppWorkPath
|
||||||
|
+ StaticRootPath = "@data@"
|
||||||
|
}
|
||||||
|
StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(StaticRootPath)
|
||||||
|
StaticCacheTime = sec.Key("STATIC_CACHE_TIME").MustDuration(6 * time.Hour)
|
Loading…
Reference in New Issue
Block a user