Skip to content

Commit

Permalink
Reads in webserver secret_key at runtime
Browse files Browse the repository at this point in the history
Fixes spacing
  • Loading branch information
ccash3 authored and ccash3 committed Mar 6, 2020
1 parent bed7779 commit 2f62271
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions script/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2f62271

Please sign in to comment.