Skip to content
Permalink
Browse files

Add pgbouncer to fix connections bug on heroku

  • Loading branch information...
overshard committed Jul 3, 2018
1 parent cd21690 commit 4b7ce4113e464c48f71c998f7e178e962f38725f
Showing with 5 additions and 2 deletions.
  1. +1 −1 Procfile
  2. +3 −0 app.json
  3. +1 −1 timestrap/settings/heroku.py
@@ -1 +1 @@
web: daphne timestrap.asgi:application --port $PORT --bind 0.0.0.0 -v2
web: bin/start-pgbouncer-stunnel daphne timestrap.asgi:application --port $PORT --bind 0.0.0.0 -v2
@@ -12,6 +12,9 @@
"version": "1.0.0-alpha",
"license": "BSD-2-Clause",
"buildpacks": [
{
"url": "https://github.com/heroku/heroku-buildpack-pgbouncer"
},
{
"url": "heroku/nodejs"
},
@@ -20,7 +20,7 @@
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases

DATABASES = {
'default': dj_database_url.config(conn_max_age=500)
'default': dj_database_url.config(conn_max_age=500, ssl_require=True)
}


0 comments on commit 4b7ce41

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.