File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
docs/content/doc/installation Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ Gitea will search for a number of things from the `CustomPath`. By default this
141
141
the ` custom/ ` directory in the current working directory when running Gitea. It will also
142
142
look for its configuration file ` CustomConf ` in ` $CustomPath/conf/app.ini ` , and will use the
143
143
current working directory as the relative base path ` AppWorkPath ` for a number configurable
144
- values.
144
+ values. Finally the static files will be served from ` StaticRootPath ` which defaults to the ` AppWorkPath ` .
145
145
146
146
These values, although useful when developing, may conflict with downstream users preferences.
147
147
@@ -152,6 +152,7 @@ using the `LDFLAGS` environment variable for `make`. The appropriate settings ar
152
152
* To set the ` CustomPath ` use ` LDFLAGS="-X \"code.gitea.io/gitea/modules/setting.CustomPath=custom-path\"" `
153
153
* For ` CustomConf ` you should use ` -X \"code.gitea.io/gitea/modules/setting.CustomConf=conf.ini\" `
154
154
* For ` AppWorkPath ` you should use ` -X \"code.gitea.io/gitea/modules/setting.AppWorkPath=working-path\" `
155
+ * For ` StaticRootPath ` you should use ` -X \"code.gitea.io/gitea/modules/setting.StaticRootPath=static-root-path\" `
155
156
156
157
Add as many of the strings with their preceding ` -X ` to the ` LDFLAGS ` variable and run ` make build `
157
158
with the appropriate ` TAGS ` as above.
Original file line number Diff line number Diff line change @@ -666,7 +666,10 @@ func NewContext() {
666
666
PortToRedirect = sec .Key ("PORT_TO_REDIRECT" ).MustString ("80" )
667
667
OfflineMode = sec .Key ("OFFLINE_MODE" ).MustBool ()
668
668
DisableRouterLog = sec .Key ("DISABLE_ROUTER_LOG" ).MustBool ()
669
- StaticRootPath = sec .Key ("STATIC_ROOT_PATH" ).MustString (AppWorkPath )
669
+ if len (StaticRootPath ) == 0 {
670
+ StaticRootPath = AppWorkPath
671
+ }
672
+ StaticRootPath = sec .Key ("STATIC_ROOT_PATH" ).MustString (StaticRootPath )
670
673
StaticCacheTime = sec .Key ("STATIC_CACHE_TIME" ).MustDuration (6 * time .Hour )
671
674
AppDataPath = sec .Key ("APP_DATA_PATH" ).MustString (path .Join (AppWorkPath , "data" ))
672
675
EnableGzip = sec .Key ("ENABLE_GZIP" ).MustBool ()
You can’t perform that action at this time.
0 commit comments