Add Docker Compose example (#316)

* Add Docker Compose example

* Update README.md

* Update README.md
This commit is contained in:
fcosrno 2017-07-26 12:31:23 -04:00 committed by Simen Bekkhus
parent 9c25cbe93f
commit 22f21ff536
1 changed files with 21 additions and 0 deletions

View File

@ -63,6 +63,27 @@ $ docker build -t my-nodejs-app .
$ docker run -it --rm --name my-running-app my-nodejs-app
```
If you prefer Docker Compose:
```yaml
version: "2"
services:
node:
image: "node:8"
environment:
- NODE_ENV=production
volumes:
- ./:/usr/src/app
expose:
- "8080"
```
You can then run using Docker Compose:
```console
$ docker-compose up -d
```
### Notes
The image assumes that your application has a file named