cp docker-compose-local.yaml docker-compose.yaml
cp docker-compose-celery.yaml docker-compose.yaml
Before starting Airflow for the first time, You need to prepare your environment, i.e. create the necessary files, directories and initialize the database.
On Linux, the mounted volumes in container use the native Linux filesystem user/group permissions, so you have to make sure the container and host computer have matching file permissions.
mkdir -p ./dags ./logs ./plugins
echo -e "AIRFLOW_UID=$(id -u)\nAIRFLOW_GID=0" > .env
On all operating systems, you need to run database migrations and create the first user account. To do it, run.
docker-compose up airflow-init
docker-compose up
In the second terminal you can check the condition of the containers and make sure that no containers are in unhealthy condition:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ed9b09fc84b1 apache/airflow:2.1.3 "/usr/bin/dumb-init …" 3 minutes ago Up 3 minutes (healthy) 8080/tcp compose_airflow-scheduler_1
7cb1fb603a98 apache/airflow:2.1.3 "/usr/bin/dumb-init …" 3 minutes ago Up 3 minutes (healthy) 0.0.0.0:8080->8080/tcp compose_airflow-webserver_1
74f3bbe506eb postgres:13 "docker-entrypoint.s…" 18 minutes ago Up 17 minutes (healthy) 5432/tcp compose_postgres_1
Once the cluster has started up, you can log in to the web interface and try to run some tasks.
The webserver available at: http://localhost:8080. The default account has the login airflow and the password airflow.
Content type
Image
Digest
Size
489.1 MB
Last updated
almost 5 years ago
docker pull bigobject/airflow