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.
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
echo "Waiting for database connection..."
|
||||
while ! nc -z $MYSQL_HOST $MYSQL_PORT; do
|
||||
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 "Database connected."
|
||||
|
||||
echo "Running alembic..."
|
||||
uv run --no-sync alembic upgrade head
|
||||
|
||||
# 把控制权交给最终命令
|
||||
exec "$@"
|
||||
|
||||
Reference in New Issue
Block a user