-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
75 lines (70 loc) · 1.79 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
services:
postgres:
container_name: postgres
image: postgres
env_file:
- .env
volumes:
- dbdata:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
firehose:
container_name: firehose
image: richardr1126/cosmere-firehose
build:
context: ./firehose
env_file:
- .env
stdin_open: true
tty: true
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "health_check.py"] # Command to check the container's health
interval: 15m # Time between each health check
timeout: 30s # Time allowed for the health check to complete
retries: 2 # Number of failed health checks before marking as unhealthy
start_period: 60s # Time to wait before starting the health checks
depends_on:
- postgres
labels:
- autoheal_firehose=true # Label to enable auto-healing for this container
scheduler:
container_name: scheduler
image: richardr1126/cosmere-db-scheduler
build:
context: ./scheduler
env_file:
- .env
restart: unless-stopped
stdin_open: true
tty: true
depends_on:
- postgres
- firehose
web:
container_name: web
image: richardr1126/cosmere-feed
build:
context: .
env_file:
- .env
ports:
- "8000:8000"
stdin_open: true
tty: true
restart: unless-stopped
depends_on:
- postgres
autoheal:
deploy:
replicas: 1
image: willfarrell/autoheal:latest
container_name: autoheal
restart: unless-stopped
environment:
- AUTOHEAL_CONTAINER_LABEL=autoheal_firehose # Label to specify which containers to monitor
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Allows access to Docker daemon to restart containers
volumes:
dbdata: