first commit
This commit is contained in:
14
myteamwallet_backend/docker-entrypoint.sh
Normal file
14
myteamwallet_backend/docker-entrypoint.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
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
|
||||
|
||||
echo "Starting application..."
|
||||
exec node dist/main
|
||||
Reference in New Issue
Block a user