Add support for the `rest_api_enabed` setting (#171)

* Add support for the rest_api_enabled setting in settings.yml
* Update rest_api_enabled setting to be of type int
This commit is contained in:
Garrett Thompson 2021-09-07 11:37:29 -07:00 committed by GitHub
parent c3cc00ca4c
commit e61a62c386
3 changed files with 4 additions and 0 deletions

View File

@ -158,6 +158,7 @@ redmine_initialize() {
info "Configuring Redmine application with settings provided via environment variables"
redmine_conf_set "default_language.default" "$REDMINE_LANGUAGE" "" "${REDMINE_CONF_DIR}/settings.yml"
redmine_conf_set "rest_api_enabled.default" "$REDMINE_REST_API_ENABLED" "int" "${REDMINE_CONF_DIR}/settings.yml"
# SMTP configuration
if ! is_empty_value "$REDMINE_SMTP_HOST"; then

View File

@ -25,6 +25,7 @@ redmine_env_vars=(
REDMINE_PORT_NUMBER
REDMINE_ENV
REDMINE_LANGUAGE
REDMINE_REST_API_ENABLED
REDMINE_LOAD_DEFAULT_DATA
REDMINE_SKIP_BOOTSTRAP
REDMINE_USERNAME
@ -92,6 +93,7 @@ export REDMINE_DAEMON_GROUP="redmine"
export REDMINE_PORT_NUMBER="${REDMINE_PORT_NUMBER:-3000}" # only used during the first initialization
export REDMINE_ENV="${REDMINE_ENV:-production}"
export REDMINE_LANGUAGE="${REDMINE_LANGUAGE:-en}" # only used during the first initialization
export REDMINE_REST_API_ENABLED="${REDMINE_REST_API_ENABLED:-0}" # only used during the first initialization
export REDMINE_LOAD_DEFAULT_DATA="${REDMINE_LOAD_DEFAULT_DATA:-yes}" # only used during the first initialization
export REDMINE_SKIP_BOOTSTRAP="${REDMINE_SKIP_BOOTSTRAP:-}" # only used during the first initialization

View File

@ -223,6 +223,7 @@ Available environment variables:
- `REDMINE_FIRST_NAME`: Redmine user first name. Default: **UserName**
- `REDMINE_LAST_NAME`: Redmine user last name. Default: **LastName**
- `REDMINE_LANGUAGE`: Redmine site default language. Default: **en**
- `REDMINE_REST_API_ENABLED`: Whether to allow REST API calls to Redmine. Default: **0**
- `REDMINE_LOAD_DEFAULT_DATA`: Whether to load default configuration data for Redmine. Default: **yes**
- `REDMINE_SKIP_BOOTSTRAP`: Whether to skip performing the initial bootstrapping for the application. This is necessary in case you use a database that already has Redmine data. Default: **no**