#!/bin/sh

VSN_GATEWAY_API_URL=${VSN_GATEWAY_API_URL:-"https://vsn-api-prerec.mc-intern.com/"}
echo "API URL: $VSN_GATEWAY_API_URL"

# Create runtime config JSON file with the environment variables
cat > /app/public/runtime-config.json << EOF
{
  "vsnGatewayApiUrl": "$VSN_GATEWAY_API_URL"
}
EOF

exec "$@"