I have test servers that spin up whenever a Github PR is open. I’m using a fork of GitHub - superfly/fly-pr-review-apps: Github Action for PR Review Apps on Fly.io that calls fly pg create --fork-from my-staging-database
so that people can interact with meaningful data in this test env.
This is working very well, but I’ve realised it might be a bit wasteful: being a temporary test database, I don’t really need a full VM, replication etc. Instead of having two apps per test environment (compute and database) I could probably achieve the same by having just one, based on a second Dockerfile including Postgres, and a custom entrypoint script that would import the data from staging to the local database.
Curious if others have tried this and what might be some other advantages of fly pg create
I’m not considering.