Unable to use fly proxy when node scaled to zero

In CI I am running fly proxy to run DB migrations but when the development postgres cluster has scaled to 0 I get

host was not found in DNS

Which technically makes sense, once I actually move the system over I will be using an HA cluster and this won’t be an issue but for now is there anything I can do to work around this?

Thanks!

You could make an http to your app to wake it up before fly proxy. But you shouldn’t do migrations like that, it should be integrated into your app’s bootup lifecycle, my 2c.

If you fly proxy to a private flycast address, instead of directly to the app, the our proxy might wake your dev DB up for you.

Looks like if I do

fly proxy 15432:5432 <app>.flycast --org <org> --app <app>

The proxy does start up (DB doesn’t though).

Any other ideas?

Looks like (for the time being until I move to an HA cluster) I can just do:
fly pg restart --app trellis-polar-db-production --force

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.