Implement relative paths for frontend API and WebSocket connections

- Created `.env.production` file to define relative paths for production deployment.
- Updated frontend API and WebSocket client to use environment variables for dynamic URL handling.
- Enhanced deployment scripts (`deploy-ubuntu.sh`, `start.sh`, `start.bat`) to generate `.env.production` automatically.
- Added `PRODUCTION_URLS.md` for documentation on production URL configuration and troubleshooting.
This commit is contained in:
Primakov Alexandr Alexandrovich
2025-10-12 23:53:47 +03:00
parent 48fbb5bcb3
commit 70889421ea
7 changed files with 288 additions and 4 deletions
+5
View File
@@ -45,6 +45,11 @@ echo.
REM 4. Сборка frontend
echo [STEP 4/7] Сборка frontend...
REM Создаем .env.production для production
echo VITE_API_URL=/api > .env.production
echo VITE_WS_URL= >> .env.production
call npm run build
echo [OK] Frontend собран в backend/public
echo.