migration

This commit is contained in:
Bastian Wagner
2026-07-31 21:20:16 +02:00
parent 6bea4f766a
commit 4ef35b3755
2 changed files with 5 additions and 11 deletions

View File

@@ -4,11 +4,9 @@ set -e
echo "Waiting for database at ${DATABASE_HOST}:${DATABASE_PORT}..."
bash ./wait-for-it.sh "${DATABASE_HOST}:${DATABASE_PORT}" -t 60
echo "Running database migrations..."
# env-cmd (used by migration:run) requires an .env file to exist, even though
# the real config already arrived as process env vars via `docker run --env-file`.
touch .env
npm run migration:run
# No automatic migration:run here: the checked-in TypeORM migrations are
# Postgres-specific and fail against the real MySQL database. Schema is kept
# in sync via DATABASE_SYNCHRONIZE, matching current production behavior.
echo "Starting application..."
exec node dist/main