1
0
Fork 0
forked from forgejo/forgejo

[BRANDING] parse FORGEJO__* in the container environment

(cherry picked from commit b075991747)
(cherry picked from commit ac8503150a)
This commit is contained in:
Earl Warren 2023-07-10 23:17:39 +02:00
parent 6730fd099d
commit 266948e08a
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 23 additions and 14 deletions

View file

@ -16,15 +16,15 @@ func main() {
app := cli.NewApp()
app.Name = "environment-to-ini"
app.Usage = "Use provided environment to update configuration ini"
app.Description = `As a helper to allow docker users to update the gitea configuration
app.Description = `As a helper to allow docker users to update the forgejo configuration
through the environment, this command allows environment variables to
be mapped to values in the ini.
Environment variables of the form "GITEA__SECTION_NAME__KEY_NAME"
Environment variables of the form "FORGEJO__SECTION_NAME__KEY_NAME"
will be mapped to the ini section "[section_name]" and the key
"KEY_NAME" with the value as provided.
Environment variables of the form "GITEA__SECTION_NAME__KEY_NAME__FILE"
Environment variables of the form "FORGEJO__SECTION_NAME__KEY_NAME__FILE"
will be mapped to the ini section "[section_name]" and the key
"KEY_NAME" with the value loaded from the specified file.
@ -42,8 +42,8 @@ func main() {
...
"""
You would set the environment variables: "GITEA__LOG_0x2E_CONSOLE__COLORIZE=false"
and "GITEA__LOG_0x2E_CONSOLE__STDERR=false". Other examples can be found
You would set the environment variables: "FORGEJO__LOG_0x2E_CONSOLE__COLORIZE=false"
and "FORGEJO__LOG_0x2E_CONSOLE__STDERR=false". Other examples can be found
on the configuration cheat sheet.`
app.Flags = []cli.Flag{
cli.StringFlag{
@ -59,7 +59,7 @@ func main() {
cli.StringFlag{
Name: "work-path, w",
Value: setting.AppWorkPath,
Usage: "Set the gitea working path",
Usage: "Set the forgejo working path",
},
cli.StringFlag{
Name: "out, o",