Do you find it so complicated to set up Apache Airflow for using right away? Don't worry, I can show you a simple and fast way! Are you ready? Then please take a look the instruction below.
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. #
# Basic Airflow cluster configuration for CeleryExecutor with Redis and PostgreSQL. # # WARNING: This configuration is for local development. Do not use it in a production deployment. # # This configuration supports basic configuration using environment variables or an .env file # The following variables are supported: # # AIRFLOW_IMAGE_NAME - Docker image name used to run Airflow. # Default: apache/airflow:master-python3.8 # AIRFLOW_UID - User ID in Airflow containers # Default: 50000 # AIRFLOW_GID - Group ID in Airflow containers # Default: 50000 # _AIRFLOW_WWW_USER_USERNAME - Username for the administrator account. # Default: airflow # _AIRFLOW_WWW_USER_PASSWORD - Password for the administrator account. # Default: airflow # # Feel free to modify this file to suit your needs. --- version:'3' x-airflow-common: &airflow-common image:${AIRFLOW_IMAGE_NAME:-apache/airflow:2.0.2} environment: &airflow-common-env AIRFLOW__CORE__EXECUTOR:CeleryExecutor AIRFLOW__CORE__SQL_ALCHEMY_CONN:postgresql+psycopg2://airflow:airflow@postgres/airflow AIRFLOW__CELERY__RESULT_BACKEND:db+postgresql://airflow:airflow@postgres/airflow AIRFLOW__CELERY__BROKER_URL:redis://:@redis:6379/0 AIRFLOW__CORE__FERNET_KEY:'' AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION:'true' AIRFLOW__CORE__LOAD_EXAMPLES:'true' AIRFLOW__API__AUTH_BACKEND:'airflow.api.auth.backend.basic_auth' volumes: -./dags:/opt/airflow/dags -./logs:/opt/airflow/logs -./plugins:/opt/airflow/plugins user:"${AIRFLOW_UID:-50000}:${AIRFLOW_GID:-50000}" depends_on: redis: condition:service_healthy postgres: condition:service_healthy