-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (47 loc) · 1.01 KB
/
docker-compose.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
48
49
50
services:
task-organizer-mongo:
image: mongo:7.0-rc
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
MONGO_INITDB_DATABASE: task_organizer
volumes:
- ./mongo-data:/data/db
networks:
- docker-network
ports:
- "27017:27017"
healthcheck:
test: [
"CMD",
"mongosh",
"--quiet",
"127.0.0.1/test",
"--eval",
"'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'",
]
interval: 5s
timeout: 5s
retries: 3
start_period: 10s
task-organizer-app:
build:
context: .
dockerfile: Dockerfile
image: deploy-tasker
environment:
DB_HOST: task-organizer-mongo
DB_USERNAME: root
DB_PASSWORD: root
JWT_SECRET: secret
networks:
- docker-network
ports:
- "8080:8080"
depends_on:
task-organizer-mongo:
condition: service_healthy
networks:
docker-network:
driver: bridge