Hello! I’m a new Fly customer setting up a new Postgres database. The instructions to expose it externally seem broken.
Steps to repro:
-
fly pg create
: Go through the steps, sample app IDmy-app
. - Machine creates successfully.
Then, Following these instructions,
- Assign IPs:
fly ips allocate-v4 --shared --app my-app
fly ips allocate-v6 --app my-app
- Configure external service:
fly config save --app my-app
- Doc bug 1: the instructions say to replace [[services]] with internal_port = 5432. This is already done.
- Find current image:
fly image show --app my-app
– Doc bug 2: the instructions have an old Image Details section. The default image isflyio/postgres-flex
at tag15.2
, but it took some experimentation to get the command right. - Redeploy image:
fly deploy . --app my-app --image flyio/postgres-flex:15.2
System bug 3: When redeploying, there’s an error:
➜ db_config git:(main) ✗ fly deploy . --app my-app --image flyio/postgres-flex:15.2
==> Verifying app config
Validating /<path removed>/fly.toml
Platform: machines
✓ Configuration is valid
--> Verified app config
==> Building image
Searching for image 'flyio/postgres-flex:15.2' remotely...
image found: img_abc123
Process groups have changed. This will:
* destroy 1 "" machine
* create 1 "app" machine
machine abc1234 was found and is currently in started state, attempting to destroy...
unregistering postgres member 'fdaa:1:e779:a7b:128:854f:6a6d:2' from the cluster... (failed)
failed to unregister postgres member: no active leader found
(success)
No machines in group 'app', launching one new machine
Oops, something went wrong! Could you try that again?
System bug 4: When running the exact same command again, there’s a different error. This error repeats after multiple runs:
➜ db_config git:(main) ✗ fly deploy . --app my-app --image flyio/postgres-flex:15.2
==> Verifying app config
Validating /<path removed>/fly.toml
Platform: machines
✓ Configuration is valid
--> Verified app config
==> Building image
Searching for image 'flyio/postgres-flex:15.2' remotely...
image found: img_abc123
Error error new machine requires an unattached volume named '' on mount destination '/data'
I took a stab at fixing this by adding [source] under [mounts]:
[mounts]
source = "pg_data"
destination = "/data"
System bug 5:
This starts to deploy… and then hangs indefinitely.
➜ db_config git:(main) ✗ fly deploy . --app my-app --image flyio/postgres-flex:15.2
==> Verifying app config
Validating /<path removed>/fly.toml
Platform: machines
✓ Configuration is valid
--> Verified app config
==> Building image
Searching for image 'flyio/postgres-flex:15.2' remotely...
image found: img_abc123
Process groups have changed. This will:
* create 1 "app" machine
No machines in group 'app', launching one new machine
Waiting for abc123 [app] to become healthy: 1/3
This is a pretty bad first Fly experience. Any tips?