Skip to content

Instantly share code, notes, and snippets.

@felladrin
Last active January 29, 2020 22:11
Show Gist options
  • Select an option

  • Save felladrin/1ae334aab5b87757dbd9b7695079561a to your computer and use it in GitHub Desktop.

Select an option

Save felladrin/1ae334aab5b87757dbd9b7695079561a to your computer and use it in GitHub Desktop.
Docker Compose configuration for running a Node app in a container
PORT=5000
version: "3.7"
services:
node:
image: node:12-slim
command: sh -c "npm i && npm run dev"
user: node
working_dir: /home/node/app
volumes:
- .:/home/node/app
ports:
- "${PORT}:${PORT}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment