feat: basic docker-compose and init files
This commit is contained in:
21
mongodb/docker-compose.yml
Normal file
21
mongodb/docker-compose.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
mongo:
|
||||
image: mongo:latest
|
||||
container_name: mongodb
|
||||
restart: always
|
||||
ports:
|
||||
- "27017:27017"
|
||||
environment:
|
||||
MONGO_INITDB_ROOT_USERNAME: root
|
||||
MONGO_INITDB_ROOT_PASSWORD: password
|
||||
MONGO_INITDB_DATABASE: path
|
||||
volumes:
|
||||
- mongo-data:/data/db
|
||||
- mongo-config:/data/configdb
|
||||
- ./init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
|
||||
|
||||
volumes:
|
||||
mongo-data:
|
||||
driver: local
|
||||
mongo-config:
|
||||
driver: local
|
||||
Reference in New Issue
Block a user