Skip to content

Commit

Permalink
Find non-secret .env environment files, esp for testing
Browse files Browse the repository at this point in the history
Find and `source` .env environment files even if
they are not flagged for encryption with the
".secret" suffix.

This makes it possible to have a .env.test file
for example to be sourced when DOTENV=test.
  • Loading branch information
jmurty committed May 22, 2018
1 parent d56b393 commit db20942
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ixc_django_docker/bin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ if [[ -n "$TRANSCRYPT_PASSWORD" ]]; then
fi

# Source global, environment and local dotenv files, if decrypted.
for dotenv in base "$DOTENV.secret" local; do
for dotenv in base "$DOTENV" "$DOTENV.secret" local; do
DOTENV_FILE="$PROJECT_DIR/.env.$dotenv"
if [[ -f "$DOTENV_FILE" ]]; then
echo "Sourcing DOTENV file: $DOTENV_FILE"
Expand Down

0 comments on commit db20942

Please sign in to comment.