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: Web Docker Image about env-config.js v 2.1.0 #7650

Open
2 tasks done
abbabe opened this issue Feb 3, 2025 · 3 comments
Open
2 tasks done

🐛 Bug Report: Web Docker Image about env-config.js v 2.1.0 #7650

abbabe opened this issue Feb 3, 2025 · 3 comments

Comments

@abbabe
Copy link

abbabe commented Feb 3, 2025

📜 Description

Hello, I installed the Novu application in a cloud environment with docker. However, in "novu web v 2.1.0", when converting env value to env-config.js, this app stores env.sample value as localhost:3000 inside build folder. SKIP_PREFLIGHT_CHECK: 'true', REACT_APP_ENVIRONMENT: 'dev', REACT_APP_VERSION: '$npm_package_version', REACT_APP_API_URL: 'http://localhost:3000', REACT_APP_WS_URL: 'http://localhost:3002', REACT_APP_WEBHOOK_URL: 'http://localhost:3003', IS_V2_ENABLED: 'true',I want to use API_URL as hostname. There is no such problem in version 0.24.0. Do you have any suggested solutions on this issue?

👟 Reproduction steps

👍 Expected behavior

👎 Actual Behavior with Screenshots

Novu version

v 2.1.0

npm version

No response

node version

No response

📃 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

Copy link

linear bot commented Feb 3, 2025

@Danielss89
Copy link

I have this problem too. Makes the frontend unusable.

@abbabe
Copy link
Author

abbabe commented Feb 11, 2025

I rebuilt the .env and .env.sample files with configMap, made some additions to my Deployment.yaml file, wrote a command to run the env.sh script when the container starts, and moved the new env-config.js file under the build folder to temporarily solve the problem.

{{- if .Values.web.configmap.enabled }} apiVersion: v1 kind: ConfigMap metadata: name: env-config data: .env: | SKIP_PREFLIGHT_CHECK=true REACT_APP_ENVIRONMENT=production REACT_APP_VERSION={{{{ .Values.app.version }}}} REACT_APP_API_URL=https://api.nt.com REACT_APP_WS_URL=ws://ws.nt.com REACT_APP_WEBHOOK_URL=http://localhost:3003 REACT_APP_NOVU_APP_ID= REACT_APP_WIDGET_EMBED_PATH= REACT_APP_IS_SELF_HOSTED= REACT_APP_INTERCOM_APP_ID= REACT_APP_SEGMENT_KEY= REACT_APP_SENTRY_DSN= REACT_APP_BLUEPRINTS_API_URL= REACT_APP_MAIL_SERVER_DOMAIN= REACT_APP_LAUNCH_DARKLY_CLIENT_SIDE_ID= IS_TEMPLATE_STORE_ENABLED= IS_MULTI_PROVIDER_CONFIGURATION_ENABLED= IS_MULTI_TENANCY_ENABLED= REACT_APP_CLERK_PUBLISHABLE_KEY= REACT_APP_IS_EE_AUTH_ENABLED= FRONT_BASE_CONTEXT_PATH= REACT_APP_PLAIN_SUPPORT_CHAT_APP_ID= IS_V2_ENABLED=true .env.sample: | SKIP_PREFLIGHT_CHECK=true REACT_APP_ENVIRONMENT=production REACT_APP_VERSION={{{{ .Values.app.version }}}} REACT_APP_API_URL=https://api.nt.com REACT_APP_WS_URL=ws://ws.nt.com REACT_APP_WEBHOOK_URL=http://localhost:3003 REACT_APP_NOVU_APP_ID= REACT_APP_WIDGET_EMBED_PATH= REACT_APP_IS_SELF_HOSTED= REACT_APP_INTERCOM_APP_ID= REACT_APP_SEGMENT_KEY= REACT_APP_SENTRY_DSN= REACT_APP_BLUEPRINTS_API_URL= REACT_APP_MAIL_SERVER_DOMAIN= REACT_APP_LAUNCH_DARKLY_CLIENT_SIDE_ID= IS_TEMPLATE_STORE_ENABLED= IS_MULTI_PROVIDER_CONFIGURATION_ENABLED= IS_MULTI_TENANCY_ENABLED= REACT_APP_CLERK_PUBLISHABLE_KEY= REACT_APP_IS_EE_AUTH_ENABLED= FRONT_BASE_CONTEXT_PATH= REACT_APP_PLAIN_SUPPORT_CHAT_APP_ID= IS_V2_ENABLED=true {{- end -}}

deployment.yaml
containers: - name: novu image: {{ template "novu.image" . }} {{- if .Values.web.configmap.enabled }} lifecycle: postStart: exec: command: ["/bin/sh", "-c", "/app/env.sh && mv /app/env-config.js /app/build/env-config.js"] volumeMounts: - name: env-config-volume mountPath: /app/.env subPath: .env - name: env-config-volume mountPath: /app/.env.sample subPath: .env.sample {{- end }}

However, I also get localhost:2022 problem and api/billing errors in the web image.

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

No branches or pull requests

3 participants