diff --git a/compose.yml b/compose.yml index 5b2c8ed..f54ea2f 100644 --- a/compose.yml +++ b/compose.yml @@ -117,7 +117,8 @@ configs: template_driver: golang app_entrypoint: name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION} - file: entrypoint.sh + file: entrypoint.sh.tmpl + template_driver: golang secrets: db_password: diff --git a/entrypoint.sh b/entrypoint.sh.tmpl similarity index 79% rename from entrypoint.sh rename to entrypoint.sh.tmpl index 46f3615..78ca6e5 100644 --- a/entrypoint.sh +++ b/entrypoint.sh.tmpl @@ -26,13 +26,13 @@ file_env() { file_env "PEERTUBE_DB_PASSWORD" -if [ -z "$PEERTUBE_SMTP_ENABLED" ]; then - file_env "PEERTUBE_SMTP_PASSWORD" -fi +{{ if eq (env "PEERTUBE_SMTP_ENABLED") "1" }} +file_env "PEERTUBE_SMTP_PASSWORD" +{{ end }} -if [ -z "$PEERTUBE_LIVE_CHAT_ENABLED" ]; then - apt -y update && apt install -y prosody && apt -y clean -fi +{{ if eq (env "PEERTUBE_LIVE_CHAT_ENABLED") "1" }} +apt -y update && apt install -y prosody && apt -y clean +{{ end }} # Copy the client files over to a named volume # so that they may be served by nginx directly