Elixir Phoenix - DBConnection.ConnectionError ssl rcv

Hello everyone, how are you?

I’m trying to deploy a LiveView application. I currently have a Service and a Postgres instance, both are Starter tier and in the same region.

When I try to deploy the LiveView application, I get the following error:

18:59:42.501 [warning] setting ssl: true on your database connection offers only limited protection, as the server's certificate is not verified. Set "ssl: [cacertfile: path/to/file]" instead
18:59:42.623 [error] Postgrex.Protocol (#PID<0.2019.0>) failed to connect: ** (DBConnection.ConnectionError) ssl recv (idle): closed

The application’s build.sh file:

#!/usr/bin/env bash

# exit on error

set -o errexit

# Initial setup

mix deps.get --only prod

MIX_ENV=prod mix compile

# Compile assets

# Make sure tailwind and esbuild are installed

MIX_ENV=prod mix assets.build

# Build minified assets

MIX_ENV=prod mix assets.deploy

# Create server script, Build the release, and overwrite the existing release directory

MIX_ENV=prod mix phx.gen.release

MIX_ENV=prod mix release --overwrite

The prod.exs configuration:

config :eternalrivals, Eternalrivals.Repo,
  username: "<username>",
  password: "<password>",
  hostname: "<internal_host>",
  database: "<database>",
  port: 5432,
  ssl: true,
  ssl_opts: [
    verify: :verify_none
  ]

The error also occurs when I try to connect via external network.

Can someone help me?

Solved. I forgot to config the runtime.exs :sweat_smile: