-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
119 lines (111 loc) · 2.73 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
services:
api:
build:
context: .
ports:
- "8000:8000"
volumes:
- .:/app
entrypoint: dockerize -wait tcp://postgres:5432 -wait tcp://opensearch:9200 -wait tcp://redis:6379 -timeout 120s
env_file: .env
depends_on:
- postgres
- opensearch
- redis
command: /app/start-dev.sh
rq_short:
build:
context: .
volumes:
- .:/app
entrypoint: dockerize -wait tcp://postgres:5432 -wait tcp://opensearch:9200 -wait tcp://redis:6379 -wait tcp://api:8000 -timeout 300s
env_file: .env
depends_on:
- api
command: python short-running-worker.py
healthcheck:
test:
[
"CMD-SHELL",
"python ./manage.py rq_health_check --queue=short-running",
]
interval: 10s
timeout: 5s
retries: 2
start_period: 5s
rq_long:
build:
context: .
volumes:
- .:/app
entrypoint: dockerize -wait tcp://postgres:5432 -wait tcp://opensearch:9200 -wait tcp://redis:6379 -wait tcp://api:8000 -timeout 300s
env_file: .env
depends_on:
- api
command: python long-running-worker.py
healthcheck:
test:
["CMD-SHELL", "python ./manage.py rq_health_check --queue=long-running"]
interval: 10s
timeout: 5s
retries: 2
start_period: 5s
rq_sched:
build:
context: .
volumes:
- .:/app
entrypoint: dockerize -wait tcp://postgres:5432 -wait tcp://opensearch:9200 -wait tcp://redis:6379 -wait tcp://api:8000 -timeout 300s
env_file: .env
depends_on:
- api
command: python cron-scheduler.py
postgres:
image: postgres:16
restart: always
ports:
- "5432:5432"
environment:
- POSTGRES_DB=datahub
- POSTGRES_PASSWORD=datahub
opensearch:
image: opensearchproject/opensearch:2.11.0
environment:
- plugins.security.disabled=true
- cluster.name=cluster-001
- node.name=node-001
- discovery.type=single-node
- bootstrap.memory_lock=true
ports:
- "9200:9200"
redis:
image: redis:7.2.4
restart: always
ports:
- "6379:6379"
rq_exporter:
image: mdawar/rq-exporter:latest
ports:
- target: 9726
published: 9726
protocol: tcp
mode: host
environment:
RQ_REDIS_HOST: "redis"
depends_on:
- redis
localstack:
build:
context: .localstack
dockerfile: Dockerfile
ports:
- '4563-4599:4563-4599'
environment:
- DISABLE_CORS_CHECKS=1
- DISABLE_CUSTOM_CORS_S3=1
- AWS_DEFAULT_REGION=eu-west-2
- EDGE_PORT=4566
- SERVICES=s3,sts,iam
volumes:
- "./.localstack/mounted:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"