siddjellali commented on issue #56008:
URL: https://github.com/apache/airflow/issues/56008#issuecomment-3325395601
I’ve finalized a solution: I created an entrypoint for my Dockerfile and
rebuilt the worker.
What do you think?
```
#!/bin/bash
set -e
echo "🚀 Starting Airflow 3.0 component: ${AIRFLOW_COMPONENT_TYPE}"
wait_for_db() {
echo "⏳ Waiting for database connection..."
timeout 30 bash -c 'until airflow db check; do sleep 1; done'
echo "✅ Database is ready"
}
case "${AIRFLOW_COMPONENT_TYPE}" in
"api-server")
echo "🌐 Starting Airflow 3.0 API Server..."
wait_for_db
airflow db migrate
exec airflow api-server
;;
"scheduler")
echo "📅 Starting Airflow 3.0 Scheduler..."
wait_for_db
exec airflow scheduler
;;
"worker")
echo "🔧 Worker mode - Airflow 3.0"
echo "ℹ️ In Airflow 3.0, workers are managed by KubernetesExecutor"
echo "ℹ️ Task command will be injected automatically"
# Configuration spécifique worker
export AIRFLOW__CORE__EXECUTOR=LocalExecutor
export AIRFLOW__CORE__LOAD_EXAMPLES=False
export PYTHONUNBUFFERED=1
# Le KubernetesExecutor injecte la commande de tâche
# Exemple : airflow tasks test dag_id task_id execution_date
exec "$@"
;;
esac
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]