Created
February 14, 2019 16:52
-
-
Save ericorruption/955d560a3f98bb7d604c834228122632 to your computer and use it in GitHub Desktop.
Simplest possible node.js dev environment?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://medium.com/@francoisromain/getting-started-with-docker-for-local-node-js-development-192ceca18781 | |
version: "3" | |
services: | |
app: | |
image: node:8 | |
volumes: | |
- ./:/home/node/app | |
working_dir: "/home/node/app" | |
user: "node" # don't use the root user for security reasons | |
ports: | |
- "3000:3000" | |
command: bash # Doesn't work for now. Need to figure out a command that leaves the process running | |
# environment: | |
# - NODE_ENV=production | |
## Then log into the machine with: | |
# docker-compose up -d | |
# docker-compose exec app {npm install, bash ...} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment