-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yaml
83 lines (74 loc) · 2.08 KB
/
docker-compose.yaml
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
version: '3.7'
x-connections: &commonConnections
AIRFLOW__CORE__EXECUTOR: 'CeleryExecutor'
AIRFLOW__CELERY__RESULT_BACKEND: 'db+postgresql://airflow:airflow@postgres:5432/airflow'
AIRFLOW__CELERY__BROKER_URL: 'redis://redis:6379/1'
x-airflow-environment: &airflowEnvironment
AIRFLOW__CORE__SQL_ALCHEMY_CONN: 'postgresql+psycopg2://airflow:airflow@postgres:5432/airflow'
PYTHONPATH: '/opt/airflow/dags'
AIRFLOW_HOME: '/opt/airflow'
AIRFLOW__CORE__LOAD_EXAMPLES: 'TRUE'
AIRFLOW__WEBSERVER__NAVBAR_COLOR: '#bca0dc'
AIRFLOW__WEBSERVER__EXPOSE_CONFIG: 'TRUE'
x-default-user: &defaultUser
USERNAME: 'admin'
PASSWORD: 'admin'
ROLE: 'Admin'
FIRSTNAME: 'Firstname'
LASTNAME: 'Lastname'
EMAIL: 'username@domain.com'
services:
postgres:
image: postgres:12-alpine
environment:
POSTGRES_USER: airflow
POSTGRES_PASSWORD: airflow
POSTGRES_DB: airflow
redis:
image: redis:6.0.9-alpine
scheduler:
build:
context: .
dockerfile: Dockerfile
depends_on:
- postgres
environment:
<<: *commonConnections
<<: *airflowEnvironment
command: scheduler
webserver:
build:
context: .
dockerfile: Dockerfile
depends_on:
- postgres
- scheduler
environment:
<<: *commonConnections
<<: *airflowEnvironment
<<: *defaultUser
ports:
- 8080:8080
command: webserver
flower:
build:
context: .
dockerfile: Dockerfile
depends_on:
- scheduler
- redis
environment:
<<: *commonConnections
<<: *airflowEnvironment
<<: *defaultUser
ports:
- 5555:5555
command: flower
worker:
build:
context: .
dockerfile: Dockerfile
environment:
<<: *commonConnections
<<: *airflowEnvironment
command: worker