Make default StaticRootPath compile time settable#12371
Merged
zeripath merged 9 commits intoAug 8, 2020
Conversation
zeripath
reviewed
Jul 31, 2020
Contributor
zeripath
left a comment
There was a problem hiding this comment.
I don't quite understand the need for the new AppStaticRootPath variable - it's not as if all the App prefixed variables are compile time settable.
Contributor
|
Need to also update diff --git a/docs/content/doc/installation/from-source.en-us.md b/docs/content/doc/installation/from-source.en-us.md
index cf3f599c5..9c7016577 100644
--- a/docs/content/doc/installation/from-source.en-us.md
+++ b/docs/content/doc/installation/from-source.en-us.md
@@ -143,7 +143,7 @@ Gitea will search for a number of things from the `CustomPath`. By default this
the `custom/` directory in the current working directory when running Gitea. It will also
look for its configuration file `CustomConf` in `$CustomPath/conf/app.ini`, and will use the
current working directory as the relative base path `AppWorkPath` for a number configurable
-values.
+values. Finally the static files will be served from `StaticRootPath` which defaults to the `AppWorkPath`.
These values, although useful when developing, may conflict with downstream users preferences.
@@ -154,6 +154,7 @@ using the `LDFLAGS` environment variable for `make`. The appropriate settings ar
* To set the `CustomPath` use `LDFLAGS="-X \"code.gitea.io/gitea/modules/setting.CustomPath=custom-path\""`
* For `CustomConf` you should use `-X \"code.gitea.io/gitea/modules/setting.CustomConf=conf.ini\"`
* For `AppWorkPath` you should use `-X \"code.gitea.io/gitea/modules/setting.AppWorkPath=working-path\"`
+* For `StaticRootPath` you should use `-X \"code.gitea.io/gitea/modules/setting.StaticRootPath=static-root-path\"`
Add as many of the strings with their preceding `-X` to the `LDFLAGS` variable and run `make build`
with the appropriate `TAGS` as above. |
Signed-off-by: Andrew Thornton <art27@cantab.net>
Contributor
|
@6543 I hope you don't mind that I've just made those above changes. |
zeripath
approved these changes
Aug 1, 2020
silverwind
approved these changes
Aug 8, 2020
Contributor
|
make lg-tm work |
Member
Author
|
Thx |
6543
added a commit
to 6543-forks/gitea
that referenced
this pull request
Sep 1, 2020
Make it possible to compile the default location of StaticRootPath independent from AppWorkPath Co-authored-by: Andrew Thornton <art27@cantab.net>
techknowlogick
added a commit
that referenced
this pull request
Sep 2, 2020
Make it possible to compile the default location of StaticRootPath independent from AppWorkPath Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
be able to compile default location of StaticRootPath independent from AppWorkPath
so you can compile with