Add comments to env.template

This commit is contained in:
Girish Ramakrishnan 2020-01-06 11:27:26 -08:00
parent 5fbe415e66
commit 85b1432d79
2 changed files with 17 additions and 0 deletions

View file

@ -2,18 +2,27 @@
SINGLE_USER_MODE=false
# Note: Changing LOCAL_DOMAIN at a later time will cause unwanted side effects, including breaking all existing federation.
# LOCAL_DOMAIN should *NOT* contain the protocol part of the domain e.g https://example.com.
LOCAL_DOMAIN=
# Use this only if you need to run mastodon on a different domain than the one used for federation.
# You can read more about this option on https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Serving_a_different_domain.md
WEB_DOMAIN=
# Database configuration
DB_HOST=
DB_PORT=
DB_NAME=
DB_USER=
DB_PASS=
# Service dependencies
REDIS_HOST=
REDIS_PORT=
REDIS_PASSWORD=
# E-mail configuration
SMTP_SERVER=
SMTP_PORT=
SMTP_FROM_ADDRESS=
@ -22,6 +31,7 @@ SMTP_PASSWORD=
SMTP_AUTH_METHOD=plain
SMTP_OPENSSL_VERIFY_MODE=none
# SSO configuration
LDAP_ENABLED=
LDAP_HOST=
LDAP_PORT=
@ -32,6 +42,10 @@ LDAP_UID=username
LDAP_SEARCH_FILTER=(|(%{uid}=%{email})(mail=%{email}))
LDAP_METHOD=plain
# Application secrets
SECRET_KEY_BASE=
OTP_SECRET=
# Optionally change default language
# DEFAULT_LOCALE=de

View file

@ -9,6 +9,8 @@ if [[ ! -f /app/data/env.production ]]; then
cp /app/pkg/env.template /app/data/env.production
fi
# LOCAL_DOMAIN is the federation domain.
# Currently, it's easier for us to support having LOCAL and WEB domain be the same
echo "==> Configuring mastodon"
sed -e "s/DB_HOST=.*/DB_HOST=${CLOUDRON_POSTGRESQL_HOST}/g" \
-e "s/DB_PORT=.*/DB_PORT=${CLOUDRON_POSTGRESQL_PORT}/g" \
@ -23,6 +25,7 @@ sed -e "s/DB_HOST=.*/DB_HOST=${CLOUDRON_POSTGRESQL_HOST}/g" \
-e "s/SMTP_FROM_ADDRESS=.*/SMTP_FROM_ADDRESS=${CLOUDRON_MAIL_FROM}/g" \
-e "s/SMTP_LOGIN=.*/SMTP_LOGIN=${CLOUDRON_MAIL_SMTP_USERNAME}/g" \
-e "s/SMTP_PASSWORD=.*/SMTP_PASSWORD=${CLOUDRON_MAIL_SMTP_PASSWORD}/g" \
-e "s/WEB_DOMAIN=.*/WEB_DOMAIN=${CLOUDRON_APP_DOMAIN}/g" \
-e "s/LOCAL_DOMAIN=.*/LOCAL_DOMAIN=${CLOUDRON_APP_DOMAIN}/g" \
-i /app/data/env.production