From 42207ca097744d157f5863f6d5305c068936aaa8 Mon Sep 17 00:00:00 2001 From: Laurent Goderre Date: Tue, 3 Oct 2017 10:55:41 -0400 Subject: [PATCH] README: Updated the docker-compose example Switched to a snippet that works out of the box with a package.json that has a start script. --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6e30f182..3317996f 100644 --- a/README.md +++ b/README.md @@ -63,17 +63,20 @@ $ docker run -it --rm --name my-running-app my-nodejs-app If you prefer Docker Compose: -```yaml +```yml version: "2" services: node: image: "node:8" + user: "node" + working_dir: /home/node/app environment: - NODE_ENV=production volumes: - - ./:/usr/src/app + - ./:/home/node/app expose: - - "8080" + - "8081" + command: "npm start" ``` You can then run using Docker Compose: