Template the entrypoint

This commit is contained in:
decentral1se 2021-05-06 13:32:01 +02:00
parent bff97d572c
commit a723573bf3
Signed by untrusted user who does not match committer: decentral1se
GPG Key ID: 92DAD76BD9567B8A
2 changed files with 8 additions and 6 deletions

View File

@ -115,7 +115,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

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh
set -e
@ -25,9 +25,10 @@ file_env() {
}
file_env "PEERTUBE_DB_PASSWORD"
{{ if (env "PEERTUBE_SMTP_ENABLED") }}
file_env "PEERTUBE_SMTP_PASSWORD"
{{ end }}
if [ -z "$PEERTUBE_SMTP_PASSWORD_FILE" ]; then
file_env "PEERTUBE_SMTP_PASSWORD"
fi
# upstream entrypoint
# https://github.com/Chocobozzz/PeerTube/blob/66f77f63437c6774acbd72584a9839a7636ea167/support/docker/production/entrypoint.sh
/usr/local/bin/entrypoint.sh "$@"