-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathdocker-compose.split.yml
59 lines (59 loc) · 1.65 KB
/
docker-compose.split.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
services:
postgres:
image: postgres:9.6
volumes:
- postgres:/var/lib/postgresql/data
environment:
POSTGRES_USER: fixme
POSTGRES_PASSWORD: fixme
POSTGRES_DB: airflow
healthcheck:
test: ["pg_isready"]
interval: 10s
timeout: 5s
retries: 5
restart: always
scheduler:
depends_on:
- postgres
build: &build
context: .
dockerfile: Dockerfile
args:
AIRFLOW_VERSION: "2.3"
SPARK_VERSION: "3.3.0"
HADOOP_VERSION: "3.3.2"
SCALA_VERSION: "2.12"
JAVA_VERSION: "11"
PYTHON_VERSION: "3.9"
SQLALCHEMY_VERSION: "1.4"
command: ["bash", "-c", "python test_db_conn.py && airflow db init && airflow scheduler"]
volumes:
- airflow_logs:/airflow/logs/
environment: &environment
ENABLE_AIRFLOW_INITDB: "true"
ENABLE_AIRFLOW_UPGRADEDB: "true"
AIRFLOW__CORE__FERNET_KEY: 8NE6O6RcTJpxcCkuKxOHOExzIJkXkeJKbRie03a69dI=
AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://fixme:fixme@postgres:5432/airflow
AIRFLOW__CORE__EXECUTOR: LocalExecutor
ENABLE_AIRFLOW_RBAC_SETUP_AUTH: "true"
AIRFLOW_WEBSERVER_RBAC_USER: admin
AIRFLOW_WEBSERVER_RBAC_PASSWORD: Password123
AIRFLOW_WEBSERVER_RBAC_EMAIL: [email protected]
AIRFLOW_WEBSERVER_RBAC_FIRST_NAME: admin
AIRFLOW_WEBSERVER_RBAC_LAST_NAME: san
restart: always
webserver:
depends_on:
- postgres
build: *build
command: ["airflow", "webserver"]
ports:
- 8080:8080
volumes:
- airflow_logs:/airflow/logs/
environment: *environment
restart: always
volumes:
postgres: {}
airflow_logs: {}