andrewmclagan/react-env

CRA Docker example gone

Closed this issue · 3 comments

Hi! I have noticed that with the release of v3.0.0, the example file for running a production Docker is gone as well as the Dockerfile that's probably used for the use-of-use nginx container is gone.

I think what would be good is if the README.md of the CRA example could be updated to add in an example on what to insert into a Dockerfile to make react-env work with a production container. This at least would make it not get obsolete fast but still give a good kick-start for people to make their own Dockerfile with the extra steps needed like apk add, etc.

Yes, we removed the example Dockerfile and Nginx Dockerfile as we deemed these out-of-scope for this library. As this library is simply used to generate a config file from the environment when your app starts, whether you use it with or without Docker is irrelevant.

e.g.

"start": "react-env --path config/.env.defaults -- next start" 

We will add an example Dockerfile to the readme anyway.

We have updated the readme to explain this use-case :-)

https://github.com/andrewmclagan/react-env/blob/master/README.md#using-with-docker-entrypoint

thanks for your input!

Perfect, thanks! That's exactly what I suggested 😄