-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
📜 Description
The web container in the self-hosted Docker setup doesn't properly apply the environment variables to the frontend application URLs. When changing environment variables like REACT_APP_API_URL or REACT_APP_WS_URL, the frontend application continues to use the default/build-time URLs (e.g localhost:3000 for API) instead of the runtime environment variables.
👟 Reproduction steps
- Use the official docker-compose.yml file for Novu v2.0.0
- Set custom environment variables for the web container:
web:
environment:
REACT_APP_API_URL: "http://custom-domain.com:3000"
REACT_APP_WS_URL: "http://custom-domain.com:3002"- Run docker-compose up -d
- Access the web interface at localhost:4200
- Open browser developer tools and inspect network requests
- Observe that API and WebSocket requests are still being made to the default URLs instead of the custom domain
👍 Expected behavior
The web container should use the provided environment variables for API and WebSocket URLs, allowing proper configuration for custom domains and different deployment scenarios.
👎 Actual Behavior with Screenshots
The web container ignores the environment variables and continues to use the default URLs hardcoded during the image build. Network requests in browser developer tools show connections being attempted to default URLs instead of the configured custom domain.
Novu version
2.0.0
npm version
10.8.2
node version
v20.18.0
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
- I checked and didn't find a similar issue
🏢 Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to submit PR?
None