fix: migrate latest hometown changes [ci skip]

This commit is contained in:
decentral1se 2023-02-15 20:16:01 +01:00
parent f72d56ddc8
commit 435aa16638
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
3 changed files with 3 additions and 29 deletions

View File

@ -1,4 +1,4 @@
export ENTRYPOINT_CONF_VERSION=v1
export ENTRYPOINT_CONF_VERSION=v2
admin() {
export OTP_SECRET=$(cat /run/secrets/otp_secret)

View File

@ -44,7 +44,6 @@ services:
- CACHE_REDIS_URL
- DB_HOST
- DB_NAME
- DB_PASS_FILE=/run/secrets/db_password
- DB_PORT
- DB_USER
- DEFAULT_LOCALE

View File

@ -2,31 +2,6 @@
set -eu
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
export DB_PASS=$(cat /run/secrets/db_password)
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
local val="$def"
if [ "${!var:-}" ]; then
val="${!var}"
elif [ "${!fileVar:-}" ]; then
val="$(< "${!fileVar}")"
fi
export "$var"="$val"
unset "$fileVar"
}
file_env "DB_PASS"
file_env "OTP_SECRET"
file_env "SECRET_KEY_BASE"
file_env "SMTP_PASSWORD"
file_env "VAPID_PRIVATE_KEY"
/usr/bin/tini -- "$@"
/usr/bin/tini -s -- "$@"