I am trying to start a Postgres image as a fly app on the private network, but going through fly’s proxy. I was hoping to get the benefit of ‘auto stop’ this way, but despite fly launch telling me:
`Your your newly deployed app is available in the organizations’ private network under http://myapp-postgres.flycast`
It is only available at the .internal address. fly dig shows me the same, empty for .flycast, address shown for .internal. It looks like it’s got only a private ip address:
❯ fly services list -a myapp-postgres
Services
PROTOCOL PORTS HANDLERS FORCE HTTPS PROCESS GROUP REGIONS MACHINES
TCP 5432 => 5432 [PROXY_PROTO] False app iad 1
This is the fly.toml that’s being used:
app = "myapp-postgres"
primary_region = "iad"
[build]
image = "postgres:16-alpine"
[env]
PGDATA = "/var/lib/postgresql/data/pgdata"
POSTGRES_DB = "postgres"
POSTGRES_PORT = "5432"
POSTGRES_USER = "postgres"
[[mounts]]
destination = "/var/lib/postgresql/data"
source = "pg_data"
[[services]]
auto_start_machines = true
auto_stop_machines = "suspend"
internal_port = 5432
min_machines_running = 0
protocol = "tcp"
[[services.ports]]
handlers = ["proxy_proto"]
port = 5432
[[vm]]
memory = "2gb"
size = "performance-1x"
In two other posts concerning .flycast troubles it seems like the advice that worked was ‘turn it off and back on again’, basically, by releasing the ip and creating it again. But these are fresh apps i’m creating, i’m working towards ‘preview apps’, i don’t really want to add a step of ‘cycle the ip’ after freshly creating it just as a workaround. I’m really hoping I’ve just got something silly set in the fly.toml.