-
Notifications
You must be signed in to change notification settings - Fork 0
/
mongodb.yml
30 lines (29 loc) · 948 Bytes
/
mongodb.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# https://hub.docker.com/r/bitnami/mongodb
services:
mongodb:
image: ${MONGODB_IMAGE}
container_name: mongodb
privileged: true
restart: on-failure
environment:
- TZ=Asia/Shanghai
- ALLOW_EMPTY_PASSWORD=${MONGODB_ALLOW_EMPTY_PASSWORD}
- MONGODB_USERNAME=${MONGODB_USERNAME}
- MONGODB_PASSWORD=${MONGODB_PASSWORD}
- MONGODB_DATABASE=${MONGODB_DATABASE}
- MONGODB_ROOT_PASSWORD=${MONGODB_ROOT_PASSWORD}
- MONGODB_EXTRA_FLAGS=${MONGODB_EXTRA_FLAGS}
- MONGODB_ENABLE_JOURNAL=${MONGODB_ENABLE_JOURNAL}
- MONGODB_ENABLE_NUMACTL=${MONGODB_ENABLE_NUMACTL}
- MONGODB_ENABLE_DIRECTORY_PER_DB=${MONGODB_ENABLE_DIRECTORY_PER_DB}
volumes:
- ${MONGODB_HOME}:/bitnami/mongodb
networks:
- mongodb
ports:
- ${MONGODB_PORT_27017}:27017
healthcheck:
test: mongosh --eval 'db.runCommand("ping").ok' --quiet
networks:
mongodb:
driver: bridge