diff --git a/docker-compose.yml b/docker-compose.yml index 0094b9bb28..095dc721f0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -62,6 +62,7 @@ services: environment: DB_HOST: 'database' DB_HOST_PORT: '5432' + DB_NAME: 'zulip' DB_USER: 'zulip' SSL_CERTIFICATE_GENERATION: 'self-signed' SETTING_MEMCACHED_LOCATION: 'memcached:11211' @@ -75,6 +76,8 @@ services: SECRETS_memcached_password: 'REPLACE_WITH_SECURE_MEMCACHED_PASSWORD' SECRETS_redis_password: 'REPLACE_WITH_SECURE_REDIS_PASSWORD' SECRETS_secret_key: 'REPLACE_WITH_SECURE_SECRET_KEY' + # Set this if you are setting a custom database user in DB_USER + # SECRETS_postgres_password: 'REPLACE_WITH_SECURE_POSTGRES_PASSWORD' SETTING_EXTERNAL_HOST: 'localhost.localdomain' SETTING_ZULIP_ADMINISTRATOR: 'admin@example.com' SETTING_EMAIL_HOST: '' # e.g. smtp.example.com diff --git a/entrypoint.sh b/entrypoint.sh index 5ec97df29a..5f0d21f8a9 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -119,6 +119,10 @@ setConfigurationValue() { echo "$VALUE" >> "$FILE" echo "Setting key \"$KEY\", type \"$TYPE\" in file \"$FILE\"." } +zulipConfConfiguration () { + crudini --set /etc/zulip/zulip.conf postgresql database_name DB_NAME + crudini --set /etc/zulip/zulip.conf postgresql database_user DB_USER +} nginxConfiguration() { echo "Executing nginx configuration ..." if [ "$DISABLE_HTTPS" == "True" ] || [ "$DISABLE_HTTPS" == "true" ]; then @@ -309,6 +313,7 @@ autoBackupConfiguration() { initialConfiguration() { echo "=== Begin Initial Configuration Phase ===" prepareDirectories + zulipConfConfiguration nginxConfiguration configureCerts additionalPuppetConfiguration