mirror of https://github.com/docker/docs.git
Corrected Indentation in docker-compose.dev.yml
It didn't use the volumes as parameter, instead it defined a service called volumes and services don't have a parameter called mongodb. Corrected indentation in yml file
This commit is contained in:
parent
1decdd31a7
commit
93a91c7ff5
|
@ -27,28 +27,28 @@ version: '3.8'
|
|||
|
||||
services:
|
||||
notes:
|
||||
build:
|
||||
context: .
|
||||
ports:
|
||||
- 8080:8080
|
||||
- 9229:9229
|
||||
environment:
|
||||
- SERVER_PORT=8080
|
||||
- DATABASE_CONNECTIONSTRING=mongodb://mongo:27017/notes
|
||||
volumes:
|
||||
- ./:/code
|
||||
command: npm run debug
|
||||
build:
|
||||
context: .
|
||||
ports:
|
||||
- 8080:8080
|
||||
- 9229:9229
|
||||
environment:
|
||||
- SERVER_PORT=8080
|
||||
- DATABASE_CONNECTIONSTRING=mongodb://mongo:27017/notes
|
||||
volumes:
|
||||
- ./:/code
|
||||
command: npm run debug
|
||||
|
||||
mongo:
|
||||
image: mongo:4.2.8
|
||||
ports:
|
||||
- 27017:27017
|
||||
volumes:
|
||||
- mongodb:/data/db
|
||||
- mongodb_config:/data/configdb
|
||||
volumes:
|
||||
mongodb:
|
||||
mongodb_config:
|
||||
image: mongo:4.2.8
|
||||
ports:
|
||||
- 27017:27017
|
||||
volumes:
|
||||
- mongodb:/data/db
|
||||
- mongodb_config:/data/configdb
|
||||
volumes:
|
||||
mongodb:
|
||||
mongodb_config:
|
||||
```
|
||||
|
||||
This Compose file is super convenient as we do not have to type all the parameters to pass to the `docker run` command. We can declaratively do that in the Compose file.
|
||||
|
|
Loading…
Reference in New Issue