-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
128 lines (124 loc) · 3.71 KB
/
docker-compose.yml
File metadata and controls
128 lines (124 loc) · 3.71 KB
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
---
x-airflow-common: &airflow-common
tmpfs:
- /tmp
env_file:
- ./data-platform/dags/.env
volumes:
- ./data-platform/config:/opt/airflow/config
- ./data-platform/dags:/opt/airflow/dags
- ./data-platform/dbt:/opt/airflow/dbt
- ./data-platform/logs:/opt/airflow/logs
- ./data-platform/plugins:/opt/airflow/plugins
- ./data-platform/scripts:/opt/airflow/scripts
# Voir la doc et s'assurer que AIRFLOW_UID est
# définit dans le .env pour correspondre à votre UID
# sed -i '/^AIRFLOW_UID=/d' .env && echo "AIRFLOW_UID=$(id -u)" >> .env
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-webapp-db:
image: postgis/postgis:15-3.3-alpine
environment:
- POSTGRES_USER=webapp
- POSTGRES_PASSWORD=webapp # pragma: allowlist secret
- POSTGRES_DB=webapp
- POSTGRES_MULTIPLE_EXTENSIONS=postgis
volumes:
- ./webapp_dbdata:/var/lib/postgresql/data:delegated
expose:
- 5432
ports:
- 6543:5432
profiles: [lvao, airflow]
lvao-warehouse-db:
image: postgis/postgis:15-3.3-alpine
environment:
- POSTGRES_USER=warehouse
- POSTGRES_PASSWORD=warehouse # pragma: allowlist secret
- POSTGRES_DB=warehouse
- POSTGRES_MULTIPLE_EXTENSIONS=postgis
volumes:
- ./warehouse_dbdata:/var/lib/postgresql/data:delegated
expose:
- 5432
ports:
- 8765:5432
profiles: [airflow]
lvao-proxy:
image: nginx:latest
ports:
- 80:80
- 443:443
volumes:
- ./nginx-local-only/servers.conf.template:/etc/nginx/templates/servers.conf.template
- ./nginx-local-only/nginx.conf:/etc/nginx/nginx.conf
- ./nginx-local-only/cache.conf:/etc/nginx/conf.d/cache.conf
- ./nginx-local-only/certs:/etc/nginx/ssl
environment:
- NGINX_DISABLE_CACHE=${NGINX_DISABLE_CACHE:-0}
- NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx
# Only substitute NGINX_DISABLE_CACHE, preserve nginx variables like $host
- NGINX_ENVSUBST_FILTER=NGINX_DISABLE_CACHE
profiles: [lvao]
airflow-db:
image: postgres:15
environment:
POSTGRES_USER: airflow
POSTGRES_PASSWORD: airflow # pragma: allowlist secret
POSTGRES_DB: airflow
volumes:
- ./airflow_dbdata:/var/lib/postgresql/data
ports:
- 7654:5432
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: data-platform/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
env_file:
- ./data-platform/dags/.env
build:
context: .
dockerfile: data-platform/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]