Skip to content

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

@youssefsiam38

Description

@youssefsiam38

📜 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions