Spaces:
Sleeping
Sleeping
File size: 595 Bytes
49f36ae | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #!/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 |