forked from Amsterdam/signals
-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
162 lines (151 loc) · 3.71 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
version: "3.9"
services:
caddy:
image: caddy:2.7-alpine
ports:
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
api:
build:
context: .
target: dev
ports:
- "8000:8000"
depends_on:
dex:
condition: service_started
mailpit:
condition: service_started
database:
condition: service_healthy
elasticsearch:
condition: service_started
celery:
condition: service_started
celery_beat:
condition: service_started
env_file:
- docker-compose/environments/.api
volumes:
- ./app:/app
- ./dwh_media:/dwh_media
- ./docker-compose/scripts/initialize.sh:/initialize.sh
command:
- /initialize.sh
celery:
build:
context: .
target: prod
depends_on:
mailpit:
condition: service_started
database:
condition: service_healthy
elasticsearch:
condition: service_started
rabbit:
condition: service_started
env_file:
- docker-compose/environments/.celery
volumes:
- ./app:/app
command: celery -A signals worker -l debug
flower:
build:
context: .
target: prod
ports:
- "5566:5566"
depends_on:
mailpit:
condition: service_started
database:
condition: service_healthy
elasticsearch:
condition: service_started
rabbit:
condition: service_started
env_file:
- docker-compose/environments/.celery
volumes:
- ./app:/app
command: celery -A signals flower --port=5566
celery_beat:
build:
context: .
target: prod
depends_on:
mailpit:
condition: service_started
database:
condition: service_healthy
elasticsearch:
condition: service_started
rabbit:
condition: service_started
celery:
condition: service_started
env_file:
- docker-compose/environments/.celery_beat
volumes:
- ./app:/app
command: celery -A signals beat -l debug --pidfile /tmp/celerybeat.pid
mailpit:
image: axllent/mailpit
ports:
- "1025:1025"
- "8025:8025"
dex:
image: quay.io/dexidp/dex:v2.23.0
user: root
command: serve /config.yml
ports:
- "5556:5556"
volumes:
- ./docker-compose/dex/dex.dev.yml:/config.yml
- dex-data:/data
elasticsearch:
image: elasticsearch:7.17.9
shm_size: '512m'
command: elasticsearch -Ehttp.host=0.0.0.0 -Etransport.host=127.0.0.1 -Expack.security.enabled=false
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx4g"
ports:
- "9200:9200"
- "9300:9300"
volumes:
- es-data:/usr/share/elasticsearch/data
database:
# postgis 3.2 is the extension version provided by Azure Database for PostgreSQL Flexible Server at the time of writing
# https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-extensions#postgres-12-extensions
image: postgis/postgis:12-3.2-alpine
shm_size: '1024m'
ports:
- "5409:5432"
environment:
POSTGRES_DB: signals
POSTGRES_USER: signals
POSTGRES_PASSWORD: insecure
volumes:
- postgres-data:/var/lib/postgresql/data
- ./dumps:/dumps
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U signals -d signals'"]
interval: 10s
timeout: 5s
retries: 5
rabbit:
image: rabbitmq:3.8-management
ports:
- "5672:5672"
- "15672:15672"
environment:
- RABBITMQ_ERLANG_COOKIE='secret cookie here'
- RABBITMQ_DEFAULT_USER=signals
- RABBITMQ_DEFAULT_PASS=insecure
- RABBITMQ_DEFAULT_VHOST=vhost
volumes:
dex-data:
es-data:
postgres-data: