Add Docker Compose example (#316)
* Add Docker Compose example * Update README.md * Update README.md
This commit is contained in:
parent
9c25cbe93f
commit
22f21ff536
21
README.md
21
README.md
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue