diff --git a/script/entrypoint.sh b/script/entrypoint.sh index 166f4837..051640df 100755 --- a/script/entrypoint.sh +++ b/script/entrypoint.sh @@ -11,6 +11,7 @@ TRY_LOOP="20" : "${AIRFLOW_HOME:="/usr/local/airflow"}" : "${AIRFLOW__CORE__FERNET_KEY:=${FERNET_KEY:=$(python -c "from cryptography.fernet import Fernet; FERNET_KEY = Fernet.generate_key().decode(); print(FERNET_KEY)")}}" : "${AIRFLOW__CORE__EXECUTOR:=${EXECUTOR:-Sequential}Executor}" +: "${AIRFLOW__WEBSERVER__SECRET_KEY:=$(python -c "import secrets; WEBSERVER_SECRET_KEY = secrets.token_urlsafe(32); print(WEBSERVER_SECRET_KEY)")}" # Load DAGs examples (default: Yes) if [[ -z "$AIRFLOW__CORE__LOAD_EXAMPLES" && "${LOAD_EX:=n}" == n ]]; then @@ -22,6 +23,7 @@ export \ AIRFLOW__CORE__EXECUTOR \ AIRFLOW__CORE__FERNET_KEY \ AIRFLOW__CORE__LOAD_EXAMPLES \ + AIRFLOW__WEBSERVER__SECRET_KEY \ # Install custom python package if requirements.txt is present if [ -e "/requirements.txt" ]; then