#!/bin/bash # 1. Clone your DAGs repository # Replace with your repo URL. Use a Personal Access Token (PAT) if private. echo "Syncing DAGs from GitHub..." git clone $GIT_REPO_URL /opt/airflow/dags # 2. Initialize or Migrate the External DB airflow db migrate # 3. Create Admin User (Optional: only needed if not already in DB) airflow users create \ --username "$ADMIN_USER" \ --password "$ADMIN_PASSWORD" \ --firstname Admin \ --lastname User \ --role Admin \ --email admin@example.com || true # 4. Start Scheduler and Webserver airflow scheduler & airflow webserver