Thank you for these docs link! I didn’t find tit. I made those suggested changes and now my app can run migrations! However it’s stills failing on healthcheck with:
3df2415693844068640885b45074b954 tcp-8080 critical dial tcp 172.19.6.234:8080: connect: connection refused
I’m trying to figure out a possible error in my runtime.exs
:
import Config
config :tesla, :adapter, {Tesla.Adapter.Finch, name: HttpClientFinch}
# ---------------------------#
# Logger
# ---------------------------#
config :logger, :console,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id],
backends: [:console, Sentry.LoggerBackend]
# ---------------------------#
# Sentry
# ---------------------------#
config :sentry,
dsn: System.get_env("SENTRY_DNS"),
environment_name: config_env(),
enable_source_code_context: true,
root_source_code_path: File.cwd!(),
tags: %{
env: "production"
},
included_environments: [System.get_env("SENTRY_ENV")]
# ---------------------------#
# Oban
# ---------------------------#
config :fuschia, Oban,
repo: Fuschia.Repo,
queues: [mailer: 5]
config :fuschia, :jobs, start: System.get_env("START_OBAN_JOBS", "true")
# ---------------------------#
# Timex
# ---------------------------#
config :timex, timezone: System.get_env("TIMEZONE", "America/Sao_Paulo")
if System.get_env("PHX_SERVER") do
config :fuschia, FuschiaWeb.Endpoint, server: true
end
if config_env() == :prod do
database_url =
System.get_env("DATABASE_URL") ||
raise "DATABASE_URL not available"
if System.get_env("ECTO_IPV6") do
config :fuschia, Fuschia.Repo,
socket_options: [:inet6]
end
config :fuschia, Fuschia.Repo,
ssl: false, # fly.io don't need
url: database_url,
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10")
secret_key_base =
System.get_env("SECRET_KEY_BASE") ||
raise "SECRET_KEY_BASE not available"
app_name =
System.get_env("FLY_APP_NAME") ||
raise "FLY_APP_NAME not available"
config :fuschia, FuschiaWeb.Endpoint,
url: [host: "#{app_name}.fly.dev", port: 80],
http: [
ip: {0, 0, 0, 0, 0, 0, 0, 0},
port: String.to_integer(System.get_env("PORT") || "4000")
],
secret_key_base: secret_key_base
end
Also my project is open source: GitHub - cciuenf/fuschia: Plataforma Digital PEA Pescarte