Skip to content
Snippets Groups Projects
Commit 7008343f authored by Tom Robinson's avatar Tom Robinson
Browse files

Inject Heroku DB SSL parameters to fix upgraded databases

parent b03f0227
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,13 @@ fi
# Heroku Postgres
if [ "$DATABASE_URL" ]; then
export MB_DB_CONNECTION_URI="$DATABASE_URL"
if [[ $string == *"?"* ]]; then
# if DATABASE_URL already has a query string don't mess with it
export MB_DB_CONNECTION_URI="$DATABASE_URL"
else
# otherwise add the SSL parameters to ensure upgraded databases work on Heroku
export MB_DB_CONNECTION_URI="$DATABASE_URL?ssl=true&sslmode=require&sslfactory=org.postgresql.ssl.NonValidatingFactory"
fi
fi
# Mailgun (Heroku)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment