feat: harden containers and ci

This commit is contained in:
2025-10-16 22:56:33 -05:00
parent c51604fdb7
commit 8ca2756d7b
14 changed files with 293 additions and 17 deletions

21
backend/docker-entrypoint.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env sh
set -euo pipefail
RUN_MIGRATIONS="${RUN_MIGRATIONS:-true}"
RUN_SEED="${RUN_SEED:-false}"
if [ "${SKIP_DB_WAIT:-false}" != "true" ]; then
node ./scripts/wait-for-db.js
fi
if [ "${RUN_MIGRATIONS}" = "true" ]; then
echo ">> Running database migrations"
npm run migrate
fi
if [ "${RUN_SEED}" = "true" ]; then
echo ">> Seeding database"
npm run seed || true
fi
exec "$@"