Update setup.sh
This commit is contained in:
@@ -228,6 +228,8 @@ start_game_services() {
|
|||||||
if [ -z "$PACKMATE_WEB_PASSWORD" ]; then
|
if [ -z "$PACKMATE_WEB_PASSWORD" ]; then
|
||||||
PACKMATE_WEB_PASSWORD="admin123"
|
PACKMATE_WEB_PASSWORD="admin123"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Preparing to start game services..."
|
||||||
# Create base64 auth string
|
# Create base64 auth string
|
||||||
PACKMATE_AUTH=$(echo -n "$PACKMATE_WEB_LOGIN:$PACKMATE_WEB_PASSWORD" | base64)
|
PACKMATE_AUTH=$(echo -n "$PACKMATE_WEB_LOGIN:$PACKMATE_WEB_PASSWORD" | base64)
|
||||||
PACKMATE_URL="http://${PACKMATE_LOCAL_IP}:65000"
|
PACKMATE_URL="http://${PACKMATE_LOCAL_IP}:65000"
|
||||||
@@ -289,7 +291,7 @@ start_game_services() {
|
|||||||
# Extract ports from docker-compose file
|
# 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/,$//')
|
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"
|
echo "Exposed ports for $service_name: $service_ports"
|
||||||
|
|
||||||
# Register service with controller and send ports
|
# Register service with controller and send ports
|
||||||
echo "Registering $service_name with controller..."
|
echo "Registering $service_name with controller..."
|
||||||
local ports_json="[$service_ports]"
|
local ports_json="[$service_ports]"
|
||||||
|
|||||||
Reference in New Issue
Block a user