Use an external Mongo database with Docker Compose
This commit is contained in:
parent
8beada58d5
commit
290ee213fd
|
@ -7,8 +7,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- db_data:/data/db
|
- db_data:/data/db
|
||||||
environment:
|
environment:
|
||||||
MONGO_INITDB_ROOT_USERNAME: root
|
MONGO_INITDB_DATABASE: monkey
|
||||||
MONGO_INITDB_ROOT_PASSWORD: test
|
|
||||||
monkey:
|
monkey:
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
@ -17,7 +16,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
environment:
|
environment:
|
||||||
MONGO_URL: mongodb://root:test@db:27017/
|
MONGO_URL: mongodb://db:27017/monkey
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db_data:
|
db_data:
|
||||||
|
|
Loading…
Reference in New Issue