-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
156 lines (145 loc) · 3.87 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
version: "3.3"
services:
app:
platform: linux/x86_64
build:
context: .
dockerfile: Dockerfile
volumes:
- ./app/:/app/
ports:
- 5000:5000
environment:
- SECRET_KEY=wowsuchsecret
- RABBITMQ_USER=admin
- RABBITMQ_PASS=bigpassword
command: ['gunicorn', 'server:create_app()', '-b', '0.0.0.0:5000', '--reload']
depends_on:
- initializer
initializer:
platform: linux/x86_64
volumes:
- ./app/:/app/
build:
context: .
dockerfile: Dockerfile
environment:
- RABBITMQ_USER=admin
- RABBITMQ_PASS=bigpassword
command: ['python3', 'initializer.py']
db:
image: mariadb:10.7
platform: linux/x86_64
volumes:
- mariadb_data:/var/lib/mysql
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
db_url: mysql://mysql:mysql@db:3306/mysql
MARIADB_RANDOM_ROOT_PASSWORD: 'yes'
MARIADB_USER: maria
MARIADB_PASSWORD: maria
MARIADB_DATABASE: maria
ports:
- 3306:3306
flower:
image: mher/flower:0.9.5
environment:
- CELERY_BROKER_URL=amqp://admin:bigpassword@rabbit:5672//
- FLOWER_PORT=5555
- FLOWER_PURGE_OFFLINE_WORKERS=10
ports:
- 5555:5555
links:
- rabbit
deploy:
replicas: 1
restart_policy:
condition: on-failure
rabbit:
build:
context: rabbit
dockerfile: Dockerfile.rabbit.local
volumes:
- rabbitmq:/var/lib/rabbitmq
ports:
- 5672:5672
celery_worker_tweet_archive:
platform: linux/x86_64
build:
context: .
dockerfile: Dockerfile
command: celery -A tasks.task_initializer worker -l INFO --concurrency 1 -Q twitter_archive --without-gossip --without-mingle
volumes:
- ./app/:/app/
environment:
- RABBITMQ_USER=admin
- RABBITMQ_PASS=bigpassword
depends_on:
- rabbit
celery_worker_twitter_user_1:
platform: linux/x86_64
build:
context: .
dockerfile: Dockerfile
command: celery -A tasks.task_initializer worker -l INFO --concurrency 1 -Q twitter_users --without-gossip --without-mingle
volumes:
- ./app/:/app/
environment:
- RABBITMQ_USER=admin
- RABBITMQ_PASS=bigpassword
celery_worker_propublica:
platform: linux/x86_64
build:
context: .
dockerfile: Dockerfile
command: celery -A tasks.task_initializer worker -l INFO --concurrency 4 -Q propublica --without-gossip --without-mingle
volumes:
- ./app/:/app/
environment:
- RABBITMQ_USER=admin
- RABBITMQ_PASS=bigpassword
depends_on:
- rabbit
celery_worker_ml:
platform: linux/x86_64
build:
context: .
dockerfile: Dockerfile
command: celery -A tasks.task_ml_initializer worker -l INFO -Q ml_tasks --concurrency 1 --pool threads --without-gossip --without-mingle
volumes:
- ./app/:/app/
environment:
- RABBITMQ_USER=admin
- RABBITMQ_PASS=bigpassword
depends_on:
- rabbit
# cron:
# platform: linux/x86_64
# volumes:
# - ./app/:/app/
# build:
# context: .
# dockerfile: Dockerfile
# environment:
# - RABBITMQ_USER=admin
# - RABBITMQ_PASS=bigpassword
# command: ['python3', 'cron_runner.py', 'collect_bill_versions']
# depends_on:
# - rabbit
dashboard:
platform: linux/x86_64
build:
context: .
dockerfile: Dockerfile
volumes:
- ./app/:/app/
ports:
- 8050:8050
environment:
- SECRET_KEY=wowsuchsecret
- RABBITMQ_USER=admin
- RABBITMQ_PASS=bigpassword
command: ['gunicorn', 'dashboard.dashboard2:server', '-b', '0.0.0.0:8050', '--reload']
volumes:
mariadb_data:
rabbitmq: