Enhance Docker deployment with environment variable configuration
- Added environment variable setup in docker-compose.yml for VITE_API_URL. - Introduced update-docker-env.sh script to create/update .env file for local and remote deployments. - Updated Dockerfile to dynamically create env-config.js during build. - Modified frontend to load environment configuration from env-config.js. - Refactored API client to use centralized config for API URL.
This commit is contained in:
@@ -7,6 +7,8 @@ services:
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_started
|
||||
environment:
|
||||
- VITE_API_URL=${VITE_API_URL:-http://backend:3000}
|
||||
networks:
|
||||
- worklenz
|
||||
|
||||
|
||||
Reference in New Issue
Block a user