-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.yml
84 lines (83 loc) · 2.14 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
76
77
78
79
80
81
82
83
84
---
services:
peering-manager:
&peering-manager
image: docker.io/peeringmanager/peering-manager:${VERSION-v1.8}
env_file: env/peering-manager.env
user: "unit:root"
volumes:
- ./startup_scripts:/opt/peering-manager/startup_scripts:z,ro
- ./initializers:/opt/peering-manager/initializers:z,ro
- ./configuration:/etc/peering-manager/config:z,ro
depends_on:
- postgres
- redis
- rqworker
healthcheck:
start_period: 60s
timeout: 3s
interval: 15s
test: "curl -f http://localhost:8080/api/ || exit 1"
rqworker:
<<: *peering-manager
depends_on:
- postgres
- redis
command:
- /opt/peering-manager/venv/bin/python
- /opt/peering-manager/manage.py
- rqworker
healthcheck:
start_period: 20s
timeout: 3s
interval: 15s
test: "ps -a | grep -v grep | grep -q rqworker || exit 1"
housekeeping:
<<: *peering-manager
environment:
- COMMAND_INTERVAL=86400
depends_on:
- postgres
- redis
command:
- /opt/peering-manager/run-command.sh
- housekeeping
healthcheck:
start_period: 20s
timeout: 3s
interval: 15s
test: "ps -a | grep -v grep | grep -q housekeeping || exit 1"
peeringdb-sync:
<<: *peering-manager
environment:
- COMMAND_INTERVAL=86400
depends_on:
- postgres
- redis
command:
- /opt/peering-manager/run-command.sh
- peeringdb_sync
healthcheck:
start_period: 20s
timeout: 3s
interval: 15s
test: "ps -a | grep -v grep | grep -q peeringdb_sync || exit 1"
postgres:
image: docker.io/postgres:14-alpine
env_file: env/postgres.env
volumes:
- peering-manager-data:/var/lib/postgresql/data
redis:
image: docker.io/redis:7-alpine
env_file: env/redis.env
volumes:
- peering-manager-redis:/data
command:
- sh
- -c # this is to evaluate the $REDIS_PASSWORD from the env
- redis-server --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose
volumes:
peering-manager-data:
driver: local
peering-manager-redis:
driver: local