Skip to content

Commit abb874d

Browse files
committed
entrypoint: Reorganize settings at top, make complete.
1 parent 6eaa850 commit abb874d

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

entrypoint.sh

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,42 +31,57 @@ normalize_bool() {
3131
esac
3232
}
3333

34-
# DB aka Database
34+
## Settings
35+
36+
# PostgreSQL
3537
DB_HOST="${DB_HOST:-127.0.0.1}"
3638
DB_HOST_PORT="${DB_HOST_PORT:-5432}"
3739
DB_NAME="${DB_NAME:-zulip}"
3840
DB_USER="${DB_USER:-zulip}"
3941
REMOTE_POSTGRES_SSLMODE="${REMOTE_POSTGRES_SSLMODE:-prefer}"
42+
4043
# RabbitMQ
4144
SETTING_RABBITMQ_HOST="${SETTING_RABBITMQ_HOST:-127.0.0.1}"
4245
SETTING_RABBITMQ_USER="${SETTING_RABBITMQ_USER:-zulip}"
4346

4447
# Redis
4548
SETTING_REDIS_HOST="${SETTING_REDIS_HOST:-127.0.0.1}"
4649
SETTING_REDIS_PORT="${SETTING_REDIS_PORT:-6379}"
50+
4751
# Memcached
4852
SETTING_MEMCACHED_LOCATION="${SETTING_MEMCACHED_LOCATION:-127.0.0.1:11211}"
49-
# Nginx settings
53+
54+
# Nginx and HTTP(S) settings
5055
DISABLE_HTTPS="$(normalize_bool DISABLE_HTTPS)"
5156
NGINX_WORKERS="${NGINX_WORKERS:-2}"
5257
NGINX_MAX_UPLOAD_SIZE="${NGINX_MAX_UPLOAD_SIZE:-80m}"
58+
LOADBALANCER_IPS="${LOADBALANCER_IPS:-}"
5359
TRUST_GATEWAY_IP="$(normalize_bool TRUST_GATEWAY_IP)"
54-
# Zulip certificate parameters
5560
SSL_CERTIFICATE_GENERATION="${SSL_CERTIFICATE_GENERATION:-self-signed}"
56-
# Zulip related settings
61+
62+
# Outgoing proxy settings
63+
PROXY_ALLOW_ADDRESSES="${PROXY_ALLOW_ADDRESSES:-}"
64+
PROXY_ALLOW_RANGES="${PROXY_ALLOW_RANGES:-}"
65+
66+
# Core Zulip settings
5767
ZULIP_AUTH_BACKENDS="${ZULIP_AUTH_BACKENDS:-EmailAuthBackend}"
58-
ZULIP_RUN_POST_SETUP_SCRIPTS="$(normalize_bool ZULIP_RUN_POST_SETUP_SCRIPTS True)"
5968
QUEUE_WORKERS_MULTIPROCESS="$(normalize_bool QUEUE_WORKERS_MULTIPROCESS)"
60-
# Zulip user setup
69+
70+
# Configuration controls
6171
FORCE_FIRST_START_INIT="$(normalize_bool FORCE_FIRST_START_INIT)"
72+
ZULIP_RUN_POST_SETUP_SCRIPTS="$(normalize_bool ZULIP_RUN_POST_SETUP_SCRIPTS True)"
73+
ZULIP_CUSTOM_SETTINGS="${ZULIP_CUSTOM_SETTINGS:-}"
74+
MANUAL_CONFIGURATION="$(normalize_bool MANUAL_CONFIGURATION)"
75+
LINK_SETTINGS_TO_DATA="$(normalize_bool LINK_SETTINGS_TO_DATA)"
76+
6277
# Auto backup settings
6378
AUTO_BACKUP_ENABLED="$(normalize_bool AUTO_BACKUP_ENABLED True)"
6479
AUTO_BACKUP_INTERVAL="${AUTO_BACKUP_INTERVAL:-30 3 * * *}"
65-
# Zulip configuration function specific variable(s)
66-
MANUAL_CONFIGURATION="$(normalize_bool MANUAL_CONFIGURATION)"
67-
LINK_SETTINGS_TO_DATA="$(normalize_bool LINK_SETTINGS_TO_DATA)"
68-
# entrypoint.sh specific variable(s)
80+
81+
## Constants
6982
SETTINGS_PY="/etc/zulip/settings.py"
83+
84+
## Global state
7085
GENERATE_CERTBOT_CERT_SCHEDULED=""
7186

7287
# BEGIN appRun functions

0 commit comments

Comments
 (0)