Update setup.sh

This commit is contained in:
ilyastar9999
2025-12-02 20:13:15 +03:00
parent d093ba9fd6
commit 84d5030e24

View File

@@ -228,6 +228,8 @@ start_game_services() {
if [ -z "$PACKMATE_WEB_PASSWORD" ]; then
PACKMATE_WEB_PASSWORD="admin123"
fi
echo "Preparing to start game services..."
# Create base64 auth string
PACKMATE_AUTH=$(echo -n "$PACKMATE_WEB_LOGIN:$PACKMATE_WEB_PASSWORD" | base64)
PACKMATE_URL="http://${PACKMATE_LOCAL_IP}:65000"
@@ -289,7 +291,7 @@ start_game_services() {
# Extract ports from docker-compose file
local service_ports=$(grep -E '^\s*-\s*"?[0-9]+:[0-9]+' "$compose_file" | sed 's/.*"\?\([0-9]*\):[0-9]*.*/\1/' | tr '\n' ',' | sed 's/,$//')
echo "Exposed ports for $service_name: $service_ports"
# Register service with controller and send ports
echo "Registering $service_name with controller..."
local ports_json="[$service_ports]"