Hey, glad you sorted it out! For context, it looks like your app is running on a shared-cpu-1x single node cluster. Apps running single instances automatically shut down if there are no open connections in the last hour and usually starts up again if something tries to connect to it.
There’s a chance that there might be be a setting in the machine running the postgres app that’s disabling autostart. You can try making the postgres app start up on its own by running a machine update and setting the autostart flag to true → fly machines update <machine_id> --autostart=true --app <app_name>