diff options
author | zeripath <art27@cantab.net> | 2019-04-29 19:08:21 +0100 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-04-29 14:08:21 -0400 |
commit | 8d0d7bc28d517acc9ca98f0468d7ff2a4fdaf139 (patch) | |
tree | 0a8817abd2512ca2ebccfd4e5dc08814933aad2b /docs/content/doc/installation/from-source.en-us.md | |
parent | ccf4783980effa871abaecd70d0f983c5062a187 (diff) | |
download | gitea-8d0d7bc28d517acc9ca98f0468d7ff2a4fdaf139.tar.gz gitea-8d0d7bc28d517acc9ca98f0468d7ff2a4fdaf139.zip |
Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631)
Diffstat (limited to 'docs/content/doc/installation/from-source.en-us.md')
-rw-r--r-- | docs/content/doc/installation/from-source.en-us.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/content/doc/installation/from-source.en-us.md b/docs/content/doc/installation/from-source.en-us.md index 73e9501eb7..ce5915cc3f 100644 --- a/docs/content/doc/installation/from-source.en-us.md +++ b/docs/content/doc/installation/from-source.en-us.md @@ -117,3 +117,26 @@ launched manually from command line, it can be killed by pressing `Ctrl + C`. ```bash ./gitea web ``` + +## Changing the default CustomPath, CustomConf and AppWorkDir + +Gitea will search for a number of things from the `CustomPath`. By default this is +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 `AppWorkDir` for a number configurable +values. + +These values, although useful when developing, may conflict with downstream users preferences. + +One option is to use a script file to shadow the `gitea` binary and create an appropriate +environment before running Gitea. However, when building you can change these defaults +using the `LDFLAGS` environment variable for `make`. The appropriate settings are as follows + +* 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 `AppWorkDir` you should use `-X \"code.gitea.io/gitea/modules/setting.AppWorkDir=working-directory\"` + +Add as many of the strings with their preceding `-X` to the `LDFLAGS` variable and run `make build` +with the appropriate `TAGS` as above. + +Running `gitea help` will allow you to review what the computed settings will be for your `gitea`. |