-
Apache Airflow version2.4.0 What happenedWhen I spin up Airflow following docker compose tutorial with
I have definitely initialised the database using What you think should happen insteadWeb server should start, the same way it does start without issues when How to reproduceSteps to reproduce: # Following instructions from this page: https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html
curl -LfO 'https://airflow.apache.org/docs/apache-airflow/2.4.0/docker-compose.yaml'
mkdir -p ./dags ./logs ./plugins
echo -e "AIRFLOW_UID=$(id -u)" > .env Then modify settings of
Then run: docker compose up airflow-init
docker compose up Before running $ docker volume ls
DRIVER VOLUME NAME
$ Operating SystemUbuntu 20.04 LTS Versions of Apache Airflow ProvidersNo response DeploymentDocker-Compose Deployment detailsRunning locally Anything elseNo response Are you willing to submit PR?
Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Thanks for opening your first issue here! Be sure to follow the issue template! |
Beta Was this translation helpful? Give feedback.
-
This is coming from wrong understanding on how docker-compose and specifically yaml anchors works. By addding "environment" section you overrode entire "environment" section from the common yaml anchor You need to find a way to add environment variable rather than override those common ones. You likely need to copy the common part to your webserver and add your environment there. Or you can add the GUNICORN envv in the common parat (it will not hurt if it is also specified for other components) Note that the docler compose we have is "quick-start" only - it's not suitable to extend and append stuff easily and if you want to make anything even close to something that you could use in production, you have to heavily modify it and possibly even rewrite completely (and I can tell you there many similar traps you can fall in that docker-compose has - unless you know it very deeply). Highly recommend switching to something more suitable (our Helm Chart and k8S are much more robust) |
Beta Was this translation helpful? Give feedback.
This is coming from wrong understanding on how docker-compose and specifically yaml anchors works.
By addding "environment" section you overrode entire "environment" section from the common yaml anchor
<<: *airflow-common
section and what you get is a default (empty) sqlite database.You need to find a way to add environment variable rather than override those common ones. You likely need to copy the common part to your webserver and add your environment there. Or you can add the GUNICORN envv in the common parat (it will not hurt if it is also specified for other components)
Note that the docler compose we have is "quick-start" only - it's not suitable to extend and append stuff easily a…