diff --git a/config/database.yml b/config/database.yml index baabbc0..3cfb7ba 100644 --- a/config/database.yml +++ b/config/database.yml @@ -83,3 +83,9 @@ test: production: <<: *default url: <%= ENV["DATABASE_URL"] %> + # When DATABASE_URL points at a Supabase connection pooler (Supavisor), + # these keep migrations and queries working across pooled connections. + # Harmless on the session pooler (port 5432); required on the transaction + # pooler (port 6543), where db:migrate otherwise hangs on an advisory lock. + prepared_statements: false + advisory_locks: false diff --git a/render.yaml b/render.yaml index c925b17..4e7e3d2 100644 --- a/render.yaml +++ b/render.yaml @@ -3,6 +3,7 @@ services: name: my-app-name # the name of this service, you should change this runtime: docker # use Dockerfile for deployment plan: free # make sure to set this to free or you'll get billed $$$ + region: ohio # set this to the SAME region as your database, near your users (Supabase "East US (Ohio)" = ohio) to avoid slow cross-region queries dockerfilePath: ./Dockerfile envVars: # this section sets some ENV variables needed by Render for deployment - key: SECRET_KEY_BASE