12 lines
403 B
Bash
Executable File
12 lines
403 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
# Claper reads SECRET_KEY_BASE, SMTP_PASSWORD, ... directly from
|
|
# /run/secrets/<NAME>; only the database URL needs to be assembled.
|
|
[ -f /run/secrets/db_password ] && export DATABASE_URL="postgres://claper:$(cat /run/secrets/db_password)@${STACK_NAME}_db:5432/claper"
|
|
|
|
# if not in "env" mode, then execute the original entrypoint and command
|
|
if [ ! "$1" = "-e" ]; then
|
|
exec "$@"
|
|
fi
|