Use docker volumes for persistent MongoDb database

This commit is contained in:
herlesupreeth
2020-07-21 11:03:49 +02:00
parent ea45e08a3a
commit 81a4a25917
3 changed files with 5 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ services:
container_name: mongo
volumes:
- ./mongo:/mnt/mongo
- ./mongo/mongodb:/var/lib/mongodb
- mongodbdata:/var/lib/mongodb
expose:
- "27017/udp"
- "27017/tcp"
@@ -130,3 +130,5 @@ networks:
ipam:
config:
- subnet: ${TEST_NETWORK}
volumes:
mongodbdata: