Files
heyform/abra-entrypoint.sh.tmpl
2026-03-09 11:24:06 -04:00

20 lines
689 B
Bash

#!/bin/sh
[ -f "$SESSION_KEY_FILE" ] && export SESSION_KEY="$(cat "${SESSION_KEY_FILE}")"
[ -f "$FORM_ENCRYPTION_KEY_FILE" ] && export FORM_ENCRYPTION_KEY="$(cat "${FORM_ENCRYPTION_KEY_FILE}")"
[ -f "$SMTP_PASSWORD_FILE" ] && export SMTP_PASSWORD="$(cat "${SMTP_PASSWORD_FILE}")"
# if not in "env" mode, then execute the original entrypoint and command
if [ ! "$1" = "-e" ]; then
if [ -z "$*" ]; then
if [ -f ./dist/main.js ]; then
node --enable-source-maps ./dist/main.js;
elif [ -f ./dist/src/main.js ]; then
node --enable-source-maps ./dist/src/main.js;
else node --enable-source-maps ./dist/packages/server/main.js;
fi
else
exec "$@"
fi
fi