refactor!: use templating for entrypoint

This commit is contained in:
decentral1se 2021-11-30 11:32:30 +01:00
parent 2f5a8b746e
commit e995af0f61
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
2 changed files with 8 additions and 7 deletions

View File

@ -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:

View File

@ -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