-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
150 lines (137 loc) · 3.04 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
version: "3.9"
x-redash-service: &redash-service
image: redash/redash:preview
depends_on:
- redash-postgres
- redash-redis
- database
networks:
- redash
profiles: ["redash"]
x-airflow-service: &airflow-service
build: ./docker/airflow
depends_on:
- airflow-backend
- database
networks:
- airflow
volumes:
- "airflow-engine:/opt/airflow"
- "./dags:/opt/airflow/dags"
- "./covid_data:/home/airflow/covid"
env_file:
- ./docker/mysql.env
profiles: ["airflow"]
x-redash-environment: &redash-environment
PYTHON_UNBUFFERED: 0
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redash-redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@redash-postgres/postgres"
services:
airflow-backend:
image: mysql:latest
command: ['--character-set-server=utf8', '--collation-server=utf8_unicode_ci', '--default-authentication-plugin=mysql_native_password']
networks:
- airflow
volumes:
- "airflow-backend:/var/lib/mysql"
env_file:
- ./docker/mysql.env
cap_add:
- SYS_NICE
profiles: ["airflow"]
airflow-scheduler:
<<: *airflow-service
command: scheduler
airflow-webserver:
<<: *airflow-service
command: webserver
ports:
- "8080:8080"
database:
build: ./docker/mongodb/
ports:
- "12345:27017"
networks:
- airflow
- api
- redash
volumes:
- "database:/data/db"
env_file:
- ./docker/mongodb.env
rest-api:
build: "./docker/rest-api"
ports:
- "11223:80"
networks:
- api
depends_on:
- database
redash-server:
<<: *redash-service
command: server
depends_on:
- redash-scheduler
- redash-scheduled_worker
- redash-adhoc_worker
ports:
- "5000:5000"
environment:
<<: *redash-environment
REDASH_WEB_WORKERS: 4
redash-scheduler:
<<: *redash-service
command: manage rq scheduler
environment:
<<: *redash-environment
QUEUES: "celery"
WORKERS_COUNT: 1
redash-scheduled_worker:
<<: *redash-service
command: manage rq worker
environment:
<<: *redash-environment
QUEUES: "scheduled_queries,schemas"
WORKERS_COUNT: 1
redash-adhoc_worker:
<<: *redash-service
command: manage rq worker
environment:
<<: *redash-environment
QUEUES: "queries"
WORKERS_COUNT: 2
redash-redis:
image: redis:5.0-alpine
networks:
- redash
profiles: ["redash"]
redash-postgres:
build: ./docker/redash-database
networks:
- redash
environment:
POSTGRES_HOST_AUTH_METHOD: "trust"
volumes:
- "redash-postgres:/var/lib/postgresql/data"
profiles: ["redash"]
redash-nginx:
image: redash/nginx:latest
networks:
- redash
ports:
- "80:80"
depends_on:
- redash-server
links:
- redash-server:redash
profiles: ["redash"]
networks:
airflow:
redash:
api:
volumes:
airflow-backend:
airflow-engine:
database:
redash-postgres: