Google Maps Bug

This commit is contained in:
Eric Gullickson
2025-11-08 12:17:29 -06:00
parent efbe9ba3c0
commit bb4a356b9e
39 changed files with 1175 additions and 449 deletions

View File

@@ -7,6 +7,7 @@ set -e
SECRETS_DIR="${SECRETS_DIR:-/run/secrets}"
CONFIG_FILE="/usr/share/nginx/html/config.js"
GOOGLE_MAPS_API_KEY=""
GOOGLE_MAPS_MAP_ID=""
# Try to read Google Maps API key from secret file
if [ -f "$SECRETS_DIR/google-maps-api-key" ]; then
@@ -17,10 +18,20 @@ else
GOOGLE_MAPS_API_KEY=""
fi
# Try to read Google Maps Map ID (optional)
if [ -f "$SECRETS_DIR/google-maps-map-id" ]; then
GOOGLE_MAPS_MAP_ID=$(cat "$SECRETS_DIR/google-maps-map-id")
echo "[Config] Loaded Google Maps Map ID from $SECRETS_DIR/google-maps-map-id"
else
echo "[Config] Info: Google Maps Map ID not found at $SECRETS_DIR/google-maps-map-id (advanced markers require this)"
GOOGLE_MAPS_MAP_ID=""
fi
# Generate config.js
cat > "$CONFIG_FILE" <<EOF
window.CONFIG = {
googleMapsApiKey: '$GOOGLE_MAPS_API_KEY'
googleMapsApiKey: '$GOOGLE_MAPS_API_KEY',
googleMapsMapId: '$GOOGLE_MAPS_MAP_ID'
};
EOF