-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
187 lines (171 loc) · 7.05 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
version: '2.1'
services:
redis:
image: 'redis:5.0.5'
# command: redis-server --requirepass redispass
postgres:
image: postgres:latest
environment:
- POSTGRES_USER=$POSTGRES_AIRFLOW_USER
- POSTGRES_PASSWORD=$POSTGRES_AIRFLOW_PASSWORD
- POSTGRES_DB=$POSTGRES_AIRFLOW_DB
# Uncomment these lines to persist data on the local filesystem.
# - PGDATA=/var/lib/postgresql/data/pgdata
# volumes:
# - ./pgdata:/var/lib/postgresql/data/pgdata
webserver:
image: datafuel/airflow:latest
restart: always
depends_on:
- postgres
- redis
environment:
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql://${POSTGRES_AIRFLOW_USER}:${POSTGRES_AIRFLOW_PASSWORD}@postgres:5432/${POSTGRES_AIRFLOW_DB}
- AIRFLOW_ADMIN_USERNAME=$AIRFLOW_ADMIN_USERNAME
- AIRFLOW_ADMIN_PASSWORD=$AIRFLOW_ADMIN_PASSWORD
- AIRFLOW_ADMIN_FIRST_NAME=$AIRFLOW_ADMIN_FIRST_NAME
- AIRFLOW_ADMIN_LAST_NAME=$AIRFLOW_ADMIN_LAST_NAME
- AIRFLOW_ADMIN_EMAIL=$AIRFLOW_ADMIN_EMAIL
# - POSTGRES_USER=airflow
# - POSTGRES_PASSWORD=airflow
# - POSTGRES_DB=airflow
# - REDIS_PASSWORD=redispass
volumes:
- ./dags:/usr/local/airflow/dags
- ./airflow_dir/setup/airflow.cfg:${AIRFLOW_USER_HOME}/airflow.cfg
- ./airflow_dir/setup/setup.sh:${AIRFLOW_USER_HOME}/setup.sh
# Uncomment to include custom plugins
# - ./plugins:/usr/local/airflow/plugins
ports:
- "8080:8080"
stdin_open: true
tty: true
command: /bin/bash setup.sh
# healthcheck:
# test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
# interval: 30s
# timeout: 30s
# retries: 3
flower:
image: datafuel/airflow:latest
restart: always
depends_on:
- redis
environment:
- EXECUTOR=Celery
- AIRFLOW__CELERY__RESULT_BACKEND_SECRET=postgresql://${POSTGRES_AIRFLOW_USER}:${POSTGRES_AIRFLOW_PASSWORD}@postgres:5432/${POSTGRES_AIRFLOW_DB}
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql://${POSTGRES_AIRFLOW_USER}:${POSTGRES_AIRFLOW_PASSWORD}@postgres:5432/${POSTGRES_AIRFLOW_DB}
# - REDIS_PASSWORD=redispass
volumes:
- ./airflow_dir/setup/airflow.cfg:${AIRFLOW_USER_HOME}/airflow.cfg
ports:
- "5555:5555"
command: airflow celery flower
scheduler:
image: datafuel/airflow:latest
restart: always
depends_on:
- webserver
volumes:
- ./dags:/usr/local/airflow/dags
- ./airflow_dir/setup/airflow.cfg/:${AIRFLOW_USER_HOME}/airflow.cfg
# - ./airflow_dir/airflow.cfg/:${AIRFLOW_USER_HOME}/airflow.cfg
# - ./airflow_dir/entrypoint.sh:${AIRFLOW_USER_HOME}/entrypoint.sh
# Uncomment to include custom plugins
# - ./plugins:/usr/local/airflow/plugins
environment:
- LOAD_EX=n
- EXECUTOR=Celery
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql://${POSTGRES_AIRFLOW_USER}:${POSTGRES_AIRFLOW_PASSWORD}@postgres:5432/${POSTGRES_AIRFLOW_DB}
# - POSTGRES_USER=airflow
# - POSTGRES_PASSWORD=airflow
# - POSTGRES_DB=airflow
# - REDIS_PASSWORD=redispass
command: airflow scheduler
worker:
image: datafuel/airflow:latest
restart: always
depends_on:
- scheduler
volumes:
- ./dags:/usr/local/airflow/dags
- ./airflow_dir/setup/airflow.cfg:${AIRFLOW_USER_HOME}/airflow.cfg
# - ./airflow_dir/airflow.cfg/:${AIRFLOW_USER_HOME}/airflow.cfg
# - ./airflow_dir/entrypoint.sh:${AIRFLOW_USER_HOME}/entrypoint.sh
# Uncomment to include custom plugins
# - ./plugins:/usr/local/airflow/plugins
environment:
- EXECUTOR=Celery
- AIRFLOW__CELERY__RESULT_BACKEND_SECRET=postgresql://${POSTGRES_AIRFLOW_USER}:${POSTGRES_AIRFLOW_PASSWORD}@postgres:5432/${POSTGRES_AIRFLOW_DB}
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql://${POSTGRES_AIRFLOW_USER}:${POSTGRES_AIRFLOW_PASSWORD}@postgres:5432/${POSTGRES_AIRFLOW_DB} # - POSTGRES_USER=airflow
# - POSTGRES_PASSWORD=airflow
# - POSTGRES_DB=airflow
# - REDIS_PASSWORD=redispass
command: airflow celery worker
minio:
hostname: minio
image: minio/minio
container_name: minio
ports:
- '9000:9000'
volumes:
- './minio/data/:/data'
- './minio/config:/root/.minio'
environment:
MINIO_ACCESS_KEY: $MINIO_ACCESS_KEY
MINIO_SECRET_KEY: $MINIO_SECRET_KEY
command: server /data
presto-coordinator:
image: lewuathe/presto-coordinator:309
ports:
- "8081:8080"
container_name: "coordinator"
command: coordinator
volumes:
- ./presto_dir/etc/coordinator/etc:/usr/local/presto-server-309/etc
# - ./minio/data/:/minio/data
# - hive-temporary-staging-directory:/mnt/presto/data/tmp
environment:
MINIO_ACCESS_KEY: $MINIO_ACCESS_KEY
MINIO_SECRET_KEY: $MINIO_SECRET_KEY
presto-worker0:
image: lewuathe/presto-worker:309
container_name: "worker0"
ports:
- "8082:8081"
command: worker0
volumes:
- ./presto_dir/etc/worker/etc:/usr/local/presto-server-309/etc
# - ./minio/data/:/minio/data
# - hive-temporary-staging-directory:/mnt/presto/data/tmp
environment:
MINIO_ACCESS_KEY: $MINIO_ACCESS_KEY
MINIO_SECRET_KEY: $MINIO_SECRET_KEY
# Hive
hive-server:
image: johannestang/hive:2.3.6-postgresql-metastore-s3
restart: always
environment:
HIVE_CORE_CONF_javax_jdo_option_ConnectionURL: "jdbc:postgresql://hive-metastore/metastore"
SERVICE_PRECONDITION: "hive-metastore:9083"
HDFS_CONF_fs_s3a_access_key: ${MINIO_ACCESS_KEY}
HDFS_CONF_fs_s3a_secret_key: ${MINIO_SECRET_KEY}
ports:
- "10000:10000"
- "10002:10002"
hive-metastore:
image: johannestang/hive:2.3.6-postgresql-metastore-s3
restart: always
command: /opt/hive/bin/hive --service metastore
environment:
SERVICE_PRECONDITION: "namenode:50070 datanode:50075 hive-metastore-postgresql:5432"
HDFS_CONF_fs_s3a_access_key: ${MINIO_ACCESS_KEY}
HDFS_CONF_fs_s3a_secret_key: ${MINIO_SECRET_KEY}
ports:
- "9083:9083"
hive-metastore-postgresql:
image: bde2020/hive-metastore-postgresql:2.3.0
# volumes:
# - ${DATADIR}/hive-metastore:/var/lib/postgresql/data
# volumes:
# hive-temporary-staging-directory: