Created
October 16, 2022 18:56
-
-
Save muthugit/05254b6799f8c98587981c87795a17f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
x-airflow-common: | |
&airflow-common | |
image: apache/airflow:2.3.0 | |
environment: | |
- AIRFLOW__CORE__EXECUTOR=LocalExecutor | |
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://postgres:postgres@postgres:5432/airflow | |
- AIRFLOW__CORE__FERNET_KEY=FB0o_zt4e3Ziq3LdUUO7F2Z95cvFFx16hU8jTeR1ASM= | |
- AIRFLOW__CORE__LOAD_EXAMPLES=False | |
- AIRFLOW__CORE__LOGGING_LEVEL=INFO | |
volumes: | |
- ./events/dags:/opt/airflow/dags | |
- ./events/logs:/opt/airflow/logs | |
- ./events/plugins:/opt/airflow/plugins | |
- ./events/airflow.cfg:/opt/airlfow/airflow.cfg | |
depends_on: | |
- postgres | |
services: | |
postgres: | |
image: postgres:latest | |
environment: | |
- POSTGRES_USER=postgres | |
- POSTGRES_PASSWORD=postgres | |
- POSTGRES_DB=airflow | |
- POSTGRES_PORT=5432 | |
ports: | |
- "5432:5432" | |
airflow-init: | |
<< : *airflow-common | |
container_name: airflow_init | |
entrypoint: /bin/bash | |
command: | |
- -c | |
- airflow users list || ( airflow db init && | |
airflow users create | |
--role Admin | |
--username airflow | |
--password airflow | |
--email [email protected] | |
--firstname airflow | |
--lastname airflow ) | |
restart: on-failure | |
airflow-webserver: | |
<< : *airflow-common | |
command: airflow webserver | |
ports: | |
- 8080:8080 | |
container_name: airflow_webserver | |
volumes: | |
- ./events/airflow.cfg:/opt/airflow/airflow.cfg | |
restart: always | |
airflow-scheduler: | |
<< : *airflow-common | |
command: airflow scheduler | |
container_name: airflow_scheduler | |
restart: always | |
redis: | |
container_name: redis | |
image: redis:latest | |
command: ["redis-server", "/etc/redis/redis.conf"] | |
volumes: | |
- ./redis.conf:/etc/redis/redis.conf | |
ports: | |
- "6379:6379" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment