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

NextJS + Dockerfile #115

Open
chadychaitocm opened this issue Aug 2, 2022 · 1 comment
Open

NextJS + Dockerfile #115

chadychaitocm opened this issue Aug 2, 2022 · 1 comment

Comments

@chadychaitocm
Copy link

I'm unsuccessfully trying to get your library to work in Dockerfile.
My problem is as follows, I would like to pass APP_ENV as a build-arg to the Dockerfile and then make react-env generate the file according to the passed argument, having multiple .env (qa, dev, prod). Could you add an example to git with this?

I tried something like that:
CMD yarn react-env --path .env.${APP_ENV} && yarn start
where APP_ENV is a build-arg, but doesn't work.

@AmruthPillai
Copy link

I've actually put react-env --silent onto the package.json build script, so when I run the same on Docker, it looks for a .env file. You can checkout the source code for better reference here: https://github.com/AmruthPillai/Reactive-Resume/

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