We are using fly.io for our dev environments, so we have around 10 environments, each of them can be on different branches. Sometimes we do a sync from the production database.
In this case we do the following:
flyctl scale count 0 -y -a {service_name}
pg_restore --verbose --clean --no-acl --no-owner -d '{conn_string}' {dump_path}
flyctl scale memory 1024 count 1 -y -a {service_name}
But our problem is that the prod database is not nessearyly on the same migration as the service. So we would like to run our release script. So is there a command to do that.
BTW, you notice that when we scale up from 0 to 1 we need to set the memory again. That is a bug because othervise the memory defaults back to 256 mb.