[bitnami/gitea] Add new customizable environment variables - ENABLE OPENID SIGNIN/SIGNUP (#66480)

* [bitnami/gitea] Add new customizable environment variables
                1. ENABLE_OPENID_SIGNIN (default: false)
                2. ENABLE_OPENID_SIGNUP (default: false)

Signed-off-by: Ismail Kutlay Acar <ikamii3.sh@gmail.com>

* [bitnami/gitea] Add new customizable environment variables - Update app.ini.template

Signed-off-by: Ismail Kutlay Acar <ikamii3.sh@gmail.com>

* [bitnami/gitea] Change to set variables after setting the wizard, since Gitea overwrites them.

Signed-off-by: Ismail Kutlay Acar <ikamii3.sh@gmail.com>

---------

Signed-off-by: Ismail Kutlay Acar <ikamii3.sh@gmail.com>
This commit is contained in:
ikamii
2024-05-10 14:07:52 +02:00
committed by GitHub
parent f7f7ddf22a
commit 43cda709c6
4 changed files with 15 additions and 0 deletions

View File

@@ -52,3 +52,7 @@ ROOT_PATH = {{GITEA_LOG_ROOT_PATH}}
PASSWORD_HASH_ALGO = {{GITEA_PASSWORD_HASH_ALGO}}
REVERSE_PROXY_LIMIT = 1
REVERSE_PROXY_TRUSTED_PROXIES = *
[openid]
ENABLE_OPENID_SIGNIN = {{GITEA_ENABLE_OPENID_SIGNIN}}
ENABLE_OPENID_SIGNUP = {{GITEA_ENABLE_OPENID_SIGNUP}}

View File

@@ -58,6 +58,8 @@ gitea_env_vars=(
GITEA_SMTP_FROM
GITEA_SMTP_USER
GITEA_SMTP_PASSWORD
GITEA_ENABLE_OPENID_SIGNIN
GITEA_ENABLE_OPENID_SIGNUP
)
for env_var in "${gitea_env_vars[@]}"; do
file_env_var="${env_var}_FILE"
@@ -121,6 +123,8 @@ export GITEA_SMTP_PORT="${GITEA_SMTP_PORT:-}"
export GITEA_SMTP_FROM="${GITEA_SMTP_FROM:-}"
export GITEA_SMTP_USER="${GITEA_SMTP_USER:-}"
export GITEA_SMTP_PASSWORD="${GITEA_SMTP_PASSWORD:-}"
export GITEA_ENABLE_OPENID_SIGNIN="${GITEA_ENABLE_OPENID_SIGNIN:-false}"
export GITEA_ENABLE_OPENID_SIGNUP="${GITEA_ENABLE_OPENID_SIGNUP:-false}"
# Gitea system parameters
export GITEA_DAEMON_USER="gitea"

View File

@@ -143,6 +143,11 @@ gitea_initialize() {
# In addition, Gitea overwrites these values after passing the wizard, so we need to set them afterwards anyways
is_empty_value "$GITEA_LOG_MODE" || gitea_conf_set "log" "MODE" "$GITEA_LOG_MODE"
is_empty_value "$GITEA_LOG_ROUTER" || gitea_conf_set "log" "ROUTER" "$GITEA_LOG_ROUTER"
# These OpenID config values are set after passing the wizard, since Gitea overwrites them.
is_empty_value "$GITEA_ENABLE_OPENID_SIGNIN" || gitea_conf_set "openid" "ENABLE_OPENID_SIGNIN" "$GITEA_ENABLE_OPENID_SIGNIN"
is_empty_value "$GITEA_ENABLE_OPENID_SIGNUP" || gitea_conf_set "openid" "ENABLE_OPENID_SIGNUP" "$GITEA_ENABLE_OPENID_SIGNUP"
info "Persisting Gitea installation"
persist_app "$app_name" "$GITEA_DATA_TO_PERSIST"
else

View File

@@ -199,6 +199,8 @@ Gitea can be configured via environment variables or using a configuration file
| `GITEA_SMTP_FROM` | Mail from address, RFC 5322. This can be just an email address, or the "Name" email@example.com format. | `nil` |
| `GITEA_SMTP_USER` | Username of mailing user (usually the senders e-mail address). | `nil` |
| `GITEA_SMTP_PASSWORD` | Password of mailing user. Use "your password" for quoting if you use special characters in the password. | `nil` |
| `GITEA_ENABLE_OPENID_SIGNIN` | Enable OpenID sign-in. | `false` |
| `GITEA_ENABLE_OPENID_SIGNUP` | Enable OpenID sign-up. | `false` |
#### Read-only environment variables