The CLI message is: “Found 1 machines that are not part of the Fly Apps Platform”, and then ask if the machine associated to the Postgres application should be migrated.
If you say yes → an error happen because the fly.toml file does not have a “mount” section - when the Postgres app uses a volume.
If you say no → a new machine is created but fails non-stop.
I previously followed the documentation some weeks ago, and it worked fine.
In the meantime, you can downgrade the version of flyctl you’re using to one that doesn’t have these issues. Version 0.0.458 is likely to work and can be installed with:
curl -L https://fly.io/install.sh | sh -s -- v0.0.458
$ flyctl deploy . --image flyio/postgres:14.6
==> Verifying app config
--> Verified app config
==> Building image
Searching for image 'flyio/postgres:14.6' remotely...
image found: img_0lq747j0ym646x35
WARN Found 1 machines that are not part of the Fly Apps Platform:
dq-db-cyanite-cache machines
ID NAME STATE REGION IMAGE IP ADDRESS VOLUME CREATED LAST UPDATED
6e82267b710087 small-bush-388 started lax flyio/postgres:14.6 (v0.0.34) fdaa:1:5a22:a7b:7d16:4d85:70c5:2 vol_ypkl7vz2ml9vqg60 2023-02-18T01:30:12Z 2023-02-18T01:30:28Z
? Migrate 1 existing machines into Fly Apps Platform? No
INFO Skipping machines migration to Fly Apps Platform and the deployment
No machines in dq-db-cyanite-cache app, launching one new machine
Machine 908052ea6e0e87 [app] update finished: success
Finished deploying
$ flyctl status
ID STATE ROLE REGION HEALTH CHECKS IMAGE CREATED UPDATED
6e82267b710087 started leader lax 3 total, 3 passing flyio/postgres:14.6 (v0.0.34) 2023-02-18T01:30:12Z 2023-02-18T01:30:28Z
908052ea6e0e87 started unknown lax flyio/postgres:14.6 (v0.0.34) 2023-02-18T01:34:46Z 2023-02-18T01:34:47Z
$ flyctl info
Command "info" is deprecated, Replaced by 'status', 'ips list', and 'services list'
App
Name = dq-db-cyanite-cache
Owner = dequency-production
Platform = machines
Hostname = dq-db-cyanite-cache.fly.dev
Services
PROTOCOL PORTS FORCE HTTPS
TCP 1374403680304 => 5432 [PG_TLS] False
IP Addresses
TYPE ADDRESS REGION CREATED AT
v4 149.248.209.81 global 4m1s ago
While using the older version of flyctl worked in going through the instructions, I still cannot connect to the db as the hostname isn’t available. And this looks weird as well:
$ ~/.fly/bin/flyctl info
Command "info" is deprecated, Replaced by 'status', 'ips list', and 'services list'
Update available 0.0.458 -> 0.0.462.
Run "flyctl version update" to upgrade.
App
Name = dq-db-cyanite-cache
Owner = dequency-production
Platform = machines
Hostname = dq-db-cyanite-cache.fly.dev
Services
PROTOCOL PORTS FORCE HTTPS
TCP 1374405256852 => 5432 [PG_TLS] False
IP Addresses
TYPE ADDRESS REGION CREATED AT
v4 37.16.18.144 global 16m40s ago