I followed the getting started steps, using fly launch
to setup an existing app. I had to convert from my previous Distillery deploy to Elixir Releases, fixing issues along the way. I think I’ve sorted those all out now, but when I try to fly deploy
, it fails because my database hasn’t been setup. Locally I’d just do a mix ecto.create
, but I can’t find anything in the forum or docs about doing this in Fly.io. Was this supposed to happen at some point during fly launch
, but was interrupted by my build failures? I’ve tried re-running fly launch
, but I still fail on my migratation step.
Here’s my full error:
Starting init (commit: 252b7bd)...
Preparing to run: `/app/bin/migrate` as nobody
2022/05/03 18:47:51 listening on [fdaa:0:607f:a7b:6b:efa4:7c00:2]:22 (DNS: [fdaa::3]:53)
18:47:53.781 mfa=DBConnection.Connection.connect/2 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (104.198.233.116:5432): non-existing domain - :nxdomain
18:47:53.781 mfa=DBConnection.Connection.connect/2 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (104.198.233.116:5432): non-existing domain - :nxdomain
18:47:54.961 mfa=DBConnection.Connection.connect/2 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (104.198.233.116:5432): non-existing domain - :nxdomain
18:47:55.443 mfa=DBConnection.Connection.connect/2 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (104.198.233.116:5432): non-existing domain - :nxdomain
18:47:56.341 mfa=DBConnection.Connection.connect/2 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (104.198.233.116:5432): non-existing domain - :nxdomain
18:47:56.734 mfa=Ecto.Migrator.verbose_schema_migration/3 [error] Could not create schema migrations table. This error usually happens due to the following:
* The database does not exist
* The "schema_migrations" table, which Ecto uses for managing
migrations, was defined by another library
* There is a deadlock while migrating (such as using concurrent
indexes with a migration_lock)
To fix the first issue, run "mix ecto.create".
To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations: