-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
47 lines (43 loc) · 1.36 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
# Running Airflow in Docker (official documentation)
# https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html
version: "3"
services:
airflow:
image: ${REPO}
container_name: airflow
volumes:
- ./dags:/opt/airflow/dags
- ./sql:/opt/airflow/sql
- ./tests:/opt/airflow/tests
- ./data:/opt/airflow/data
- ./requirements.txt:/opt/airflow/requirements.txt
environment:
- AIRFLOW_HOME=/opt/airflow
- AIRFLOW__CORE__FERNET_KEY=${FERNET_KEY}
- AIRFLOW__CORE__EXECUTOR=${EXECUTOR}
- AIRFLOW__CORE__LOAD_EXAMPLES=false
- AIRFLOW__CORE__LOAD_DEFAULT_CONNECTIONS=false
- AIRFLOW__API__AUTH_BACKEND=${AIRFLOW_API_BACKEND}
ports:
- 8080:8080
command: 'bash -c "pip3 install -r requirements.txt && airflow db init && airflow webserver -D && airflow scheduler -D"'
legacy-database:
image: postgres:13.1
restart: always
container_name: legacy-database
ports:
- 54320:54320
environment:
- POSTGRES_USER=${SOURCE_USER}
- POSTGRES_PASSWORD=${SOURCE_PASSWORD}
- POSTGRES_DB=${SOURCE_DB}
analytics-database:
image: postgres:13.1
restart: always
container_name: analytics-database
ports:
- 54321:54321
environment:
- POSTGRES_USER=${DEST_USER}
- POSTGRES_PASSWORD=${DEST_PASSWORD}
- POSTGRES_DB=${DEST_DB}