Fix frontend docker configuration in docker-compose #1632
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes to frontend to make
docker-compose up
work again on a fresh clone.Two fixes need to happen:
npm install
needs to run when building the docker container, so that all of the dependencies exist.docker-compose.yml
file to properly link up the frontend to the backend.[Edit]: this previously consisted of only a single commit that looked at the frontend.Dockerfile file. As I continued trying to get an environment up, I noticed another fix that needed to be made and decided it was similar-enough in scope that it should be added to his pull request. The original description follows.
Add
npm install
to frontend DockerThe frontend Docker image appears to be following a pretty standard Node
convention of adding the package.json, running
npm install
, and thencopying the rest of the application, which makes rebuilding new docker
images much faster if there are no dependency changes.
However, in the great
yarn
cleanup of 2017,yarn install
was removedbut the corresponding
npm install
was not added back. This means thatwhen the frontend docker image tries to run ember, ember is not
available because it was never installed.