Skip to content

Instantly share code, notes, and snippets.

@chuckha
Created July 29, 2017 14:30
Show Gist options
  • Save chuckha/3118e42a29ce78651e86053aaf119c30 to your computer and use it in GitHub Desktop.
Save chuckha/3118e42a29ce78651e86053aaf119c30 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Check that the environment variable has been set correctly
if [ -z "$SECRETS_BUCKET_NAME" ]; then
echo >&2 'error: missing SECRETS_BUCKET_NAME environment variable'
exit 1
fi
# Load the S3 secrets file contents into the environment variables
eval $(aws s3 cp s3://${SECRETS_BUCKET_NAME}/db_credentials.txt - | sed 's/^/export /')
# Call the WordPress entry-point script
/entrypoint.sh "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment