-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-git-autosync.yaml
executable file
·56 lines (49 loc) · 1.53 KB
/
docker-compose-git-autosync.yaml
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
version: '3.4'
x-globalenvs: &globalenvs
# As an example, initializing without the user code.
ZAIRFLOW_POST_LOAD_USER_CODE: 'true'
ZAIRFLOW_DB_HOST: 'postgres'
# Git autosync
GIT_AUTOSYNC_REPO_URL: 'https://github.com/LamaAni/zairflow.git'
GIT_AUTOSYNC_REPO_BRANCH: 'master'
AIRFLOW__CORE__DAGS_FOLDER: /app/examples/docker-compose/dags
AIRFLOW__CORE__PLUGINS_FOLDER: /app/examples/docker-compose/plugins
# Other airflow args
AIRFLOW__CORE__LOGGING_CONFIG_CLASS: airflow_db_logger.LOGGING_CONFIG
AIRFLOW__CORE__SQL_ALCHEMY_CONN: 'postgresql+psycopg2://airflow:airflow@postgres:5432/airflow'
AIRFLOW__CORE__LOAD_EXAMPLES: 'False'
networks:
airflow-backend:
driver: bridge
services:
airflow-web:
image: lamaani/zairflow:latest
networks:
- airflow-backend
ports:
- '8080:8080'
environment:
ZAIRFLOW_CONTAINER_TYPE: 'webserver'
ZAIRFLOW_RUN_INIT_ENVIRONMENT: 'true'
<<: *globalenvs
airflow-scheduler:
image: lamaani/zairflow:latest
networks:
- airflow-backend
environment:
ZAIRFLOW_CONTAINER_TYPE: 'scheduler'
# start the airflow scheduler after the web-service has started.
# since we want to run the init connections only once.
ZAIRFLOW_WAIT_FOR: 'airflow-web:8080'
<<: *globalenvs
postgres:
image: 'postgres:12.2'
networks:
- airflow-backend
environment:
POSTGRES_USER: 'airflow'
POSTGRES_PASSWORD: 'airflow'
POSTGRES_DB: 'airflow'
MAX_CONNECTIONS: '10000'
ports:
- '5432:5432'