-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
90 lines (86 loc) · 2.23 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
---
x-airflow-common:
&airflow-common
env_file:
- ./dags/.env
volumes:
- ./logs:/opt/airflow/logs
- ./dags:/opt/airflow/dags
- ./config:/opt/airflow/config
- ./plugins:/opt/airflow/plugins
# Only for Linux
# user: "${AIRFLOW_UID:-50000}:0"
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
&airflow-common-depends-on
airflow-db:
condition: service_healthy
services:
lvao-db:
image: postgis/postgis:15-3.3-alpine
environment:
- POSTGRES_USER=qfdmo
- POSTGRES_PASSWORD=qfdmo # pragma: allowlist secret
- POSTGRES_DB=qfdmo
- POSTGRES_MULTIPLE_EXTENSIONS=postgis
volumes:
- ./pgdata:/var/lib/postgresql/data:delegated
expose:
- 5432
ports:
- 6543:5432
profiles: [lvao, airflow]
airflow-db:
image: postgres:15
environment:
POSTGRES_USER: airflow
POSTGRES_PASSWORD: airflow
POSTGRES_DB: airflow
volumes:
- ./airflow-pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "airflow"]
interval: 10s
retries: 5
start_period: 5s
profiles: [airflow]
airflow-webserver:
<<: *airflow-common
environment:
_AIRFLOW_DB_MIGRATE: 'true'
_AIRFLOW_WWW_USER_CREATE: 'true'
_AIRFLOW_WWW_USER_USERNAME: ${_AIRFLOW_WWW_USER_USERNAME:-airflow}
_AIRFLOW_WWW_USER_PASSWORD: ${_AIRFLOW_WWW_USER_PASSWORD:-airflow}
_PIP_ADDITIONAL_REQUIREMENTS: ''
user: "0:0"
build:
context: .
dockerfile: airflow-webserver.Dockerfile
ports:
- "8080:8080"
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
depends_on:
<<: *airflow-common-depends-on
profiles: [airflow]
airflow-scheduler:
<<: *airflow-common
build:
context: .
dockerfile: airflow-scheduler.Dockerfile
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8974/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
depends_on:
<<: *airflow-common-depends-on
airflow-webserver:
condition: service_healthy
profiles: [airflow]