Files
claper/abra-entrypoint.sh
2026-11-09 15:27:14 +01:00

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