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

Deployed custom application is not working due to .env file #3588

Open
JiyaAgrawal20 opened this issue Aug 8, 2024 · 1 comment
Open

Deployed custom application is not working due to .env file #3588

JiyaAgrawal20 opened this issue Aug 8, 2024 · 1 comment

Comments

@JiyaAgrawal20
Copy link

I created a custom application for commercetools merchant centre and deployed it on vercel. I am using a .env file for localhost and vercel environment variables for the deployed version.

Now my issue is that the deployed version is not working if my github repo-main branch does not contain the same .env file even though the application is able to pull data from the vercel environment variables.

I am using useApplicationContext for pulling each variable from .env file. I am defining variables in custom-application-config.mjs file inside additionalEnv object like this :
`additionalEnv: {

authUrl: process.env.CTP_AUTH_URL,

apiUrl: process.env.CTP_API_URL,

projectKey: process.env.CTP_PROJECT_KEY,

clientSecret: process.env.CTP_CLIENT_SECRET,

clientId: process.env.CTP_CLIENT_ID,

scopes: process.env.CTP_SCOPES,

},`

I don't want to push my .env file to main branch or the github repo at all, but the application is not working without it.

@kark
Copy link
Contributor

kark commented Aug 8, 2024

Hi 👋,
Could you please open a support issue at https://support.commercetools.com/
Thank you

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

2 participants