Files
g0v0-server/docker-entrypoint.sh
咕谷酱 616656638d Improve JWT claims and chat channel reliability
Adds standard JWT claims (audience and issuer) to access tokens and updates config for these fields. Refactors multiplayer room chat channel logic to ensure reliable user join/leave with retry mechanisms, improves error handling and cleanup, and ensures host is correctly added as a participant. Updates Docker entrypoint for better compatibility and connection handling, modifies Docker Compose and Nginx config for improved deployment and proxy header forwarding.
2025-08-26 13:18:11 +08:00

19 lines
408 B
Bash

#!/usr/bin/env sh
set -eu
MYSQL_HOST="${MYSQL_HOST:-localhost}"
MYSQL_PORT="${MYSQL_PORT:-3306}"
echo "Waiting for database connection at ${MYSQL_HOST}:${MYSQL_PORT} ..."
# -w 2 加个超时,避免卡死
until nc -z -w 2 "$MYSQL_HOST" "$MYSQL_PORT"; do
sleep 1
done
echo "Database connected."
echo "Running alembic..."
uv run --no-sync alembic upgrade head
# 把控制权交给最终命令
exec "$@"