Adds Dockerfile and docker-compose.yml to project #47
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.
First off, thank you for a fantastic course! It has helped me understand not only React and Redux, but a great deal more about the node ecosystem than I could have hoped.
I do most of my development in a docker environment. The
Dockerfile
anddocker-compose.yml
included in this PR allow me to follow the course using containers. This allows me to keep my system uncluttered with installations, and gives me a repeatable development environment. I have a Dockerfile and docker-compose.yml for the auth-server as well. That allowed me to avoid installing mongo on my host system, and only bring it up when runningdocker-compose up
.If you have the docker tools installed (Docker, Docker Machine, Docker Compose), the following steps would get you up and running:
These commands will pull the required images and create new ones from the Dockerfile. The up command starts webpack dev server. (I have it on port 8100 as there was a conflict with another service on my machine, but this port is totally changeable).
To install packages, you can use the run command and add
--save the-package-name
to the end.The Dockerfile modifies the container's chown command so that it plays nice with when node tries to own all the files (the code here basically fakes node out so it thinks it owns them all after install).
Thanks for your time, and I hope you find this useful.