diff --git a/.env b/.env new file mode 100644 index 0000000..638fe9f --- /dev/null +++ b/.env @@ -0,0 +1,7 @@ +# For local development, uncomment these lines: +# VITE_API_URL=http://localhost:3002/api +# VITE_WS_URL=ws://localhost:3002 + +# For production/domain deployment, use relative URLs (default): +VITE_API_URL=/drones/api +VITE_WS_URL=/drones diff --git a/docker-compose.yml b/docker-compose.yml index d1d6020..5f1703e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -87,8 +87,8 @@ services: context: ./client dockerfile: Dockerfile args: - VITE_API_URL: http://localhost:3002/api - VITE_WS_URL: ws://localhost:3002 + VITE_API_URL: ${VITE_API_URL:-/drones/api} + VITE_WS_URL: ${VITE_WS_URL:-/drones} NODE_ENV: production container_name: drone-detection-frontend restart: unless-stopped