dinigo commented on issue #8606:
URL: https://github.com/apache/airflow/issues/8606#issuecomment-735492915


   Yes. But I had to split the script from the template for the same reason
   
   Here the service inside the Docker-Compose.yml
   ```yml
   init:
       <<: *airflow-template
       volumes:
         - ./init-airflow.sh:/entrypoint
       depends_on:
         - database
   ```
   And the simple script that locks like so
   ```bash
   airflow db upgrade
   if [ $(users list | grep \"${INIT_EMAIL}\") ]
   then
       echo \"User ${INIT_EMAIL} already exists\"
   else
       airflow users create \
           --firstname Admin \
        --lastname None \
        --email \"${INIT_EMAIL}\" \
        --password \"${INIT_PASSWORD}\" \
                --username \"${INIT_USER}\" \
        --role Admin
   fi
   ```
   
   I reuse the users, password and email for several config variables that I 
define in the"Airflow-template" environment.
   
   This is working


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