Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report: Docker Image v2.0.0 Environment Variables Not Applied to Frontend URLs #6747

Open
2 tasks done
youssefsiam38 opened this issue Oct 22, 2024 · 2 comments
Open
2 tasks done
Labels

Comments

@youssefsiam38
Copy link

📜 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

  1. Use the official docker-compose.yml file for Novu v2.0.0
  2. 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"
  1. Run docker-compose up -d
  2. Access the web interface at localhost:4200
  3. Open browser developer tools and inspect network requests
  4. 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?

Are you willing to submit PR?

None

@youssefsiam38 youssefsiam38 changed the title 🐛 Bug Report: Web Container Environment Variables Not Applied to Frontend URLs 🐛 Bug Report: Docker Image v2.0.0 Environment Variables Not Applied to Frontend URLs Oct 22, 2024
@youssefsiam38
Copy link
Author

This issue unfortunately put a damper on our excitement about v2.0.0, as we can't properly configure frontend URLs for production. Any updates on this? We're eager to use the new version but blocked by this environment variable behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant