-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
27 lines (25 loc) · 817 Bytes
/
compose.yaml
File metadata and controls
27 lines (25 loc) · 817 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
services:
server:
build:
context: .
ports:
- '8000:80'
environment:
- MONGO_URL=mongodb://mongo:27017/gitstream
depends_on:
mongo:
condition: service_healthy # wait for MongoDB to be running before starting the server
mongo:
image: mongo
command: mongod --quiet --logpath /dev/null # https://stackoverflow.com/questions/54695525/how-to-reduce-mongo-log-verbosity-in-a-docker-compose-image
volumes:
- mongo-data:/data/db
- mongo-configdb-not-used:/data/configdb # the mongo image creates this volume, but it is not used unless you use --configsvr
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
volumes:
mongo-data:
mongo-configdb-not-used: