-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.mongodb.yml
47 lines (44 loc) · 1.03 KB
/
docker-compose.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
version: "3"
services:
mongodb:
image: mongo:7.0.6
restart: always
volumes:
- "./data/mongo/configdb:/data/configdb"
- "./data/mongo/db:/data/db"
environment:
TZ: "Asia/Shanghai"
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
ports:
- 27017:27017
tty: true
stdin_open: true
networks:
- simplylab
logging:
driver: "json-file"
options:
max-size: "2m"
max-file: "10"
mongo-express:
image: mongo-express:1.0.2
restart: always
ports:
- 8081:8081
environment:
TZ: "Asia/Shanghai"
ME_CONFIG_MONGODB_ADMINUSERNAME: ${MONGO_USERNAME}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${MONGO_PASSWORD}
ME_CONFIG_MONGODB_URL: mongodb://${MONGO_USERNAME}:${MONGO_PASSWORD}@mongodb:27017/
tty: true
stdin_open: true
networks:
- simplylab
logging:
driver: "json-file"
options:
max-size: "2m"
max-file: "10"
networks:
simplylab: