Closed marikoja closed 3 years ago
@marikoja I think this is going to end up with a large production image with a slow startup. Large b/c includes build environment, and slow b/c it does build during startup.
Is there a reason not to use something like the strategy I had included with the issue?
@bjkeller I couldn't for the life of me get it to work, even when I just tried the tutorial as a brand new project. The closest I got to working was using the hints from the commenter but it never read the parameters.
Shouldn't have to build on each production start. So, going to close this and try a different strategy.
This repo https://github.com/axelhzf/create-react-app-docker-environment-variables is mentioned in an issue of the example that you used. The strategy is simpler than the one I linked to in the issue
Problem: During a production build the front end did not have access to the environment variables. Solution: Create a production dockerfile that calls a run script to create the production build. Used this tutorial as a guide This does not update any of the other container images to production images, ie the dockerfile still calls development for the backend.
resolves #648 resolves #649