potiuk edited a comment on issue #15502:
URL: https://github.com/apache/airflow/issues/15502#issuecomment-826088769


   Closing this as invalid. There is no information about how you are running 
this and what docker-compose you use. The Dockerfile is not supposed to create 
a database, docker image is only there to run the software.
   
   If you have an external DB, you need to create airflow DB using some kind of 
init container. With Docker-compose you could create an init-service that could 
do it. There are examples in 
https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html where 
you can see an example docker compose that uses external database and creates 
it  for "production" settings where database is external and it initializes the 
DB and creates the admin user.
   
   If you just want to use "sqlite" embeded database for a "really quick start" 
(not production - it's not supposed to be used in production)  in the docker 
image you have the environment variable _AIRFLOW_DB_UPGRADE that you can use to 
create/upgrade the schema as described here: 
https://airflow.apache.org/docs/docker-stack/entrypoint.html#upgrading-airflow-db
 but this is really for "local development" purpose.
   


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to