a19e1415f1
chore: add Dockerfile
17 lines
335 B
Bash
Executable file
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
|