-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
executable file
·39 lines (39 loc) · 1.08 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
version: "3"
services:
postgres:
image: postgres:12
user: "${AIRFLOW_UID}:${AIRFLOW_GID}"
volumes:
- ./pg-airflow:/var/lib/postgresql/data
env_file:
- .env
ports:
- "127.0.0.1:${AIRFLOW_POSTGRES_PORT}:5432"
container_name: "airflow-db-${AIRFLOW_ENV_TYPE}-${AIRFLOW_ENV_NAME}"
webserver:
build:
context: .
dockerfile: Dockerfile
hostname: webserver
restart: always
depends_on:
- postgres
command: webserver
env_file:
- .env
volumes:
- ./dags:/opt/airflow/dags
- ./scripts:/opt/airflow/scripts
- ./logs:/opt/airflow/logs
- ./plugins:/opt/airflow/plugins
- ./requirements.txt:/opt/airflow/requirements.txt
ports:
- "127.0.0.1:${AIRFLOW_WEBSERVER_PORT}:8080"
- "127.0.0.1:${AIRFLOW_LOG_SERVER_PORT}:8793"
entrypoint: ./scripts/airflow-entrypoint.sh
healthcheck:
test: ["CMD-SHELL", "[ -f /opt/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 32
container_name: "airflow-${AIRFLOW_ENV_TYPE}-${AIRFLOW_ENV_NAME}"