-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
85 lines (80 loc) · 2.35 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
version: '2.4'
services:
airflow:
image: la-metro-dashboard
build: .
container_name: la-metro-dashboard
stdin_open: true
tty: true
environment:
- AIRFLOW_HOME=/app
- AIRFLOW__CORE__FERNET_KEY=38H0RL0YR-fNb2YTbNIAD9CX-1NBcnHNwpJzGlLY5X4=
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql://postgres:postgres@dashboard_postgres:5432/la_metro_dashboard
- AIRFLOW_DIR_PATH=${PWD}
- GPG_KEYRING_PATH=${GPG_KEYRING_PATH}
- LA_METRO_DATABASE_URL=postgresql://postgres:postgres@postgres:5432/lametro
- LA_METRO_DOCKER_IMAGE_TAG=main
- AIRFLOW__SENTRY__SENTRY_DSN=
- AIRFLOW__SENTRY__ENVIRONMENT=dev
networks:
- app_net
ports:
- 8080:8080
depends_on:
dashboard_postgres:
condition: service_healthy
volumes:
- .:/app
- /var/run/docker.sock:/var/run/docker.sock
command: airflow webserver -p 8080
dashboard_postgres:
container_name: la-metro-dashboard-postgres
image: postgres:11
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
environment:
- POSTGRES_DB=la_metro_dashboard
- POSTGRES_PASSWORD=postgres
networks:
- app_net
volumes:
- la-metro-dashboard-db-data:/var/lib/postgresql/data
ports:
- 32001:5432
scheduler:
image: la-metro-dashboard
build: .
container_name: la-metro-dashboard-scheduler
restart: always
# Allow container to be attached to, e.g., to access the pdb shell
stdin_open: true
tty: true
environment:
- AIRFLOW_HOME=/app
- AIRFLOW_DIR_PATH=${PWD}
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql://postgres:postgres@dashboard_postgres:5432/la_metro_dashboard
- DOCKER_NETWORK=la-metro-councilmatic_default
- GPG_KEYRING_PATH=${GPG_KEYRING_PATH}
- LA_METRO_DATABASE_URL=postgresql://postgres:postgres@postgres:5432/lametro
- LA_METRO_DOCKER_IMAGE_TAG=main
- SENTRY_ENVIRONMENT=dev
env_file:
- .env
networks:
- app_net
depends_on:
dashboard_postgres:
condition: service_healthy
volumes:
- .:/app
- /var/run/docker.sock:/var/run/docker.sock
command: airflow scheduler
volumes:
la-metro-dashboard-db-data:
networks:
app_net:
name: la-metro-councilmatic_default
external: true