-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
140 lines (129 loc) · 3.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
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
version: "3.7"
services:
db:
image: kartoza/postgis:14-3.3--v2022.08.30
shm_size: 1gb
volumes:
- db_data:/var/lib/postgresql/data
env_file: .env
ports:
- "5432:5432"
networks:
- app-network
redis:
image: "redis:alpine"
ports:
- "6379:6379"
networks:
- app-network
app:
build: .
image: sparte/backend:latest
command: ["sh", "-c", "python manage.py runserver 0.0.0.0:8080 --nothreading"]
volumes:
- .:/app
env_file: .env
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- SCALINGO_REDIS_URL=redis://redis:6379/0
ports:
- "8080:8080"
depends_on:
- db
- redis
networks:
- app-network
highchart:
image: swannbm/scalingo-highcharts-export-server
command: highcharts-export-server --enableServer 1 --port 8090 --host 0.0.0.0
ports:
- "8090:8090"
networks:
- app-network
worker-quick:
build: .
image: sparte/backend:latest
working_dir: /app
volumes:
- .:/app
command: celery -A config.celery worker --loglevel debug --concurrency=4 --max-tasks-per-child=1
env_file: .env
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- HIGHCHART_SERVER=http://highchart:8090/
- SCALINGO_REDIS_URL=redis://redis:6379/0
depends_on:
- db
- redis
networks:
- app-network
worker-long:
build: .
image: sparte/backend:latest
working_dir: /app
volumes:
- .:/app
command: celery -A config.celery worker --loglevel debug --concurrency=4 --max-tasks-per-child=1 -Q long
env_file: .env
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- HIGHCHART_SERVER=http://highchart:8090/
- SCALINGO_REDIS_URL=redis://redis:6379/0
depends_on:
- db
- redis
networks:
- app-network
worker-beat:
build: .
image: sparte/backend:latest
working_dir: /app
volumes:
- .:/app
command: celery -A config.celery beat --loglevel=debug
env_file: .env
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- SCALINGO_REDIS_URL=redis://redis:6379/0
depends_on:
- db
- redis
networks:
- app-network
flower:
image: mher/flower
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- FLOWER_PORT=8887
networks:
- app-network
ports:
- 8887:8887
jupyter:
image: sparte/backend:latest
command: python manage.py shell_plus --notebook
volumes:
- .:/app
env_file: .env
environment:
- DJANGO_ALLOW_ASYNC_UNSAFE=true
- JUPYTER_CONFIG_DIR=/app/config/
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- SCALINGO_REDIS_URL=redis://redis:6379/0
depends_on:
- db
- redis
ports:
- 8888:8888
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
db_data: