-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
140 lines (128 loc) · 3.2 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'
x-redash-service: &redash-service
image: redash/redash:latest
depends_on:
- postgres-redash
- redis
env_file: redash.env
restart: always
services:
postgres-airflow:
image: postgres
environment:
POSTGRES_PASSWORD: pssd
POSTGRES_USER : airflowuser
POSTGRES_DB : airflowdb
AIRFLOW_SCHEMA: airflow
expose:
- 5432
restart: always
volumes:
- ./scripts_postgres:/docker-entrypoint-initdb.d
# - ./sample_data:/sample_data
postgres-redash:
image: postgres
env_file: redash.env
restart: always
expose:
- 5432
postgres-db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: pssd
POSTGRES_USER : dbtuser
POSTGRES_DB : analytics
expose:
- 5432
mysqldb:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: dbtdb
MYSQL_PORT_3306_TCP_PORT: 3306
container_name: mysql_container_test
command: [ "--default-authentication-plugin=mysql_native_password" ]
expose:
- 3306
volumes:
- ./my.cnf:/etc/mysql/my.cnf
- ./data:/var/lib/mysql-files/
airflow:
build: .
restart: always
environment:
DBT_PROFILES_DIR: /dbt
AIRFLOW_HOME: /airflow
AIRFLOW__CORE__DAGS_FOLDER: /airflow/dags
AIRFLOW__CORE__PARALLELISM: 4
AIRFLOW__CORE__DAG_CONCURRENCY: 4
AIRFLOW__CORE__MAX_ACTIVE_RUNS_PER_DAG: 4
# AIRFLOW__ADMIN__HIDE_SENSITIVE_VARIABLE_FIELDS: False
# Postgres details need to match with the values defined in the postgres-airflow service
POSTGRES_USER: airflowuser
POSTGRES_PASSWORD: pssd
POSTGRES_HOST: postgres-airflow
POSTGRES_PORT: 5432
POSTGRES_DB: airflowdb
# postgres-dbt connection details. Required for the inital loading of seed data
# Credentials need to match with service postgres-dbt
DBT_MYSQL_PASSWORD: root
DBT_MYSQL_USER: root
DBT_MYSQL_DB: dbtdb
DBT_MYSQL_SCHEMA: dbt
DBT_MYSQL_RAW_DATA_SCHEMA: dbt_raw_data
DBT_MYSQL_HOST: mysqldb
MYSQL_PORT: 3306
## this is unnessacry
DBT_POSTGRES_PASSWORD: root
DBT_POSTGRES_USER : root,
DBT_POSTGRES_DB : dbtdb
DBT_DBT_SCHEMA: dbt
DBT_DBT_RAW_DATA_SCHEMA: dbt_raw_data
DBT_POSTGRES_HOST: mysqldb
depends_on:
- postgres-airflow
- mysqldb
ports:
- 8000:8080
volumes:
- ./dbt:/dbt
- ./airflow:/airflow
adminer:
image: adminer
restart: always
ports:
- 8080:8080
depends_on:
- postgres-airflow
- mysqldb
- postgres-db
server:
<<: *redash-service
command: server
ports:
- 5000:5000
environment:
REDASH_WEB_WORKERS: 4
scheduler:
<<: *redash-service
command: scheduler
environment:
QUEUES: "celery"
WORKERS_COUNT: 1
scheduled_worker:
<<: *redash-service
command: worker
environment:
QUEUES: "scheduled_queries,schemas"
WORKERS_COUNT: 1
adhoc_worker:
<<: *redash-service
command: worker
environment:
QUEUES: "queries"
WORKERS_COUNT: 2
redis:
image: redis:latest
restart: always