-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
33 lines (30 loc) · 815 Bytes
/
docker-compose.yaml
File metadata and controls
33 lines (30 loc) · 815 Bytes
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
version: '3.9'
x-logging: &default-logging
driver: json-file
options:
max-size: "1K"
max-file: "2"
services:
mongo:
image: mongo
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: pass
volumes:
- ./1-mongo-init.js:/docker-entrypoint-initdb.d/1-init-mongo.js
ports:
- 27018:27017
logging: *default-logging
mongo-express:
image: mongo-express
restart: unless-stopped
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: admin
ME_CONFIG_MONGODB_ADMINPASSWORD: pass
ME_CONFIG_MONGODB_URL: mongodb://admin:pass@mongo:27017/
logging: *default-logging
depends_on:
- mongo