From 85b1432d7932b2282dc6036375c1234456a17b06 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Mon, 6 Jan 2020 11:27:26 -0800 Subject: [PATCH] Add comments to env.template --- env.template | 14 ++++++++++++++ start.sh | 3 +++ 2 files changed, 17 insertions(+) diff --git a/env.template b/env.template index 034ca2a..af0ea15 100644 --- a/env.template +++ b/env.template @@ -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 + diff --git a/start.sh b/start.sh index 71bba91..5d0b15c 100755 --- a/start.sh +++ b/start.sh @@ -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