-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (70 loc) · 1.83 KB
/
Copy pathdocker-compose.yml
File metadata and controls
74 lines (70 loc) · 1.83 KB
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
version: "3.3"
services:
web:
build:
context: .
dockerfile: Dockerfile
cache_from:
- type=local,src=/tmp/.buildx-cache-new,mode=max
command: |
bash -c "flask db upgrade
flask refresh_releases
gunicorn --worker-class eventlet --bind 0.0.0.0:5000 --workers 1 wsgi:app"
ports:
- "5000:5000"
environment:
CELERY_BROKER_URL: redis://redis:6379
CELERY_RESULT_BACKEND: redis://redis:6379
SOCKETIO_MESSAGE_QUEUE: redis://redis:6379
EVENTLET_NO_GREENDNS: "yes"
MATL_ONLINE_ENV: prod
SQLALCHEMY_DATABASE_URI: postgresql://postgres:password@postgres
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000"]
interval: 5s
timeout: 10s
retries: 5
depends_on:
- redis
- postgres
- worker
worker:
build:
context: .
dockerfile: Dockerfile
cache_from:
- type=local,src=/tmp/.buildx-cache-new,mode=max
command: celery --app worker.celery worker --purge --autoscale=4,2 -Ofair --loglevel INFO
environment:
CELERY_BROKER_URL: redis://redis:6379
CELERY_RESULT_BACKEND: redis://redis:6379
SOCKETIO_MESSAGE_QUEUE: redis://redis:6379
EVENTLET_NO_GREENDNS: "yes"
MATL_ONLINE_ENV: prod
depends_on:
- redis
flower:
build:
context: .
dockerfile: Dockerfile
cache_from:
- type=local,src=/tmp/.buildx-cache-new,mode=max
environment:
CELERY_BROKER_URL: redis://redis:6379
CELERY_RESULT_BACKEND: redis://redis:6379
MATL_ONLINE_ENV: prod
command: celery --app worker.celery flower
ports:
- "5555:5555"
depends_on:
- redis
redis:
image: redis:alpine
ports:
- "6379"
postgres:
image: postgres
environment:
POSTGRES_PASSWORD: password
ports:
- "5432"