Created
September 1, 2023 15:59
-
-
Save airscholar/3b35e272ac6db2f206a5bdd2ab7b44f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| if [ -e "/opt/airflow/requirements.txt" ]; then | |
| $(command -v pip) install --user -r requirements.txt | |
| fi | |
| # Initialize the database if it hasn't been initialized yet | |
| if [ ! -f "/opt/airflow/airflow.db" ]; then | |
| airflow db init && \ | |
| airflow users create \ | |
| --username admin \ | |
| --firstname admin \ | |
| --lastname admin \ | |
| --role Admin \ | |
| --email admin@airscholar.com \ | |
| --password admin | |
| fi | |
| $(command -v airflow) db upgrade | |
| exec airflow webserver |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment