ExpressTemplate/entrypoint.sh
Jo a19e1415f1 refactor: improve env loading
chore: add Dockerfile
2023-11-26 00:25:28 +01:00

17 lines
335 B
Bash
Executable file

#!/bin/bash
set -e
# Function to check if the database is healthy
check_database() {
until nc -z -w 1 "$DB_HOST" "$DB_PORT"; do
>&2 echo "[JET] Waiting for MySQL to be ready..."
sleep 1
done
>&2 echo "[JET] MySQL is ready"
}
# Check if the database is healthy
check_database
# Start the Express app
exec npm run start