feat: Add dynamic host IP detection for Docker Compose and Supabase config
- Add docker-compose.sh wrapper script that auto-detects host IP - Update docker-compose.yml to use environment variable substitution - Update Supabase config.toml files to use HOST_SITE_URL and SUPABASE_API_URL env vars - Add scripts/get-host-ip.sh for IP detection - Add scripts/set-host-env.sh for environment setup - Add scripts/supabase-with-env.sh wrapper for Supabase CLI - Add documentation for Docker Compose environment setup - Update README.md with new usage instructions - Replace hardcoded URLs with dynamic environment variables
This commit is contained in:
@@ -376,7 +376,8 @@ services:
|
||||
environment:
|
||||
- CHOKIDAR_USEPOLLING=true
|
||||
- TZ=America/New_York
|
||||
- VITE_SUPABASE_URL=http://localhost:54321
|
||||
# Use environment variable with fallback to localhost
|
||||
- VITE_SUPABASE_URL=${VITE_SUPABASE_URL:-http://localhost:54321}
|
||||
command: >
|
||||
sh -lc "
|
||||
npm install;
|
||||
@@ -403,8 +404,9 @@ services:
|
||||
environment:
|
||||
- CHOKIDAR_USEPOLLING=true
|
||||
- TZ=America/New_York
|
||||
- VITE_MEDIA_API_URL=http://exp-dash:8090
|
||||
- VITE_VISION_API_URL=http://exp-dash:8000
|
||||
# Use environment variables with fallback to localhost
|
||||
- VITE_MEDIA_API_URL=${VITE_MEDIA_API_URL:-http://localhost:8090}
|
||||
- VITE_VISION_API_URL=${VITE_VISION_API_URL:-http://localhost:8000}
|
||||
volumes:
|
||||
- ./video-remote:/app
|
||||
command: >
|
||||
@@ -426,7 +428,8 @@ services:
|
||||
environment:
|
||||
- CHOKIDAR_USEPOLLING=true
|
||||
- TZ=America/New_York
|
||||
- VITE_VISION_API_URL=http://exp-dash:8000
|
||||
# Use environment variable with fallback to localhost
|
||||
- VITE_VISION_API_URL=${VITE_VISION_API_URL:-http://localhost:8000}
|
||||
volumes:
|
||||
- ./vision-system-remote:/app
|
||||
command: >
|
||||
|
||||
Reference in New Issue
Block a user