I’m trying to bring an app to Fly.io from Heroku, but I’m running into an issue. When I run the fly deploy command it is complaining about a connection to the database. I’m seeing failed to connect: ** (DBConnection.ConnectionError) tcp connect (refleq-staging-db.flycast:5432): non-existing domain - :nxdomain
I can’t see how to connect to the DB without going through the ssh console, but the app doesn’t boot, so I can’t ssh in. I’m stuck.
Ok, I overcame that issue it was the IPV6 issue in the Repo connection. I added a secret that was needed for a function call named maybe_ipv6.
Now the app deploys with no errors, but won’t boot, just says it isn’t responding on the 8080 port. My endpoint config in runtime.exs:
config :my_app, MyAppWeb.Endpoint,
url: [host: host, port: 443, scheme: "https"],
http: [
# Enable IPv6 and bind on all interfaces.
# Set it to {0, 0, 0, 0, 0, 0, 0, 1} for local network only access.
# See the documentation on https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html
# for details about using IPv6 vs IPv4 and loopback vs public addresses.
port: 8080
],
secret_key_base: secret_key_base
This is the error:
[info]waiting for machine to be reachable on 0.0.0.0:8080 (waited 7.297739789s so far)
[info]waiting for machine to be reachable on 0.0.0.0:8080 (waited 13.302390813s so far)
[info]waiting for machine to be reachable on 0.0.0.0:8080 (waited 19.306426468s so far)
[error][PM05] failed to connect to machine: gave up after 15 attempts (in 24.310567701s)
[info]Starting machine
If I run it in docker locally it seems to boot getting stuck on the database connection which is expected.
Running MyAppWeb.Endpoint with cowboy 2.12.0 at 0.0.0.0:8080