-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
34 lines (34 loc) · 728 Bytes
/
compose.yaml
File metadata and controls
34 lines (34 loc) · 728 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
34
services:
example:
build: .
environment:
- DOCDB_EXAMPLE_CONNECTION_STRING=mongodb://root:root@mongo:27017
ports:
- 8000:8000
depends_on:
mongo:
condition: service_healthy
restart: on-failure
mongo:
image: mongo:5.0.31
volumes:
- mongo:/data/db
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=root
healthcheck:
test:
- CMD
- mongo
- --quiet
- 127.0.0.1/test
- --eval
- "quit(db.runCommand({ ping: 1 }).ok ? 0 : 1)"
interval: 10s
timeout: 10s
start_period: 30s
start_interval: 5s
retries: 5
restart: on-failure
volumes:
mongo: