Deploy migrations from different dockerfile on release

Hi,

I have a golang echo web application and I use atlasgo to do database migrations. From a security best-practice perspective I would like not to bundle my migrations and migration tool into my application container. I need the migrations to run on release though. I.E. I want a different Dockerfile just for the database migrations. Is there a way to have the release_command run from a different image? If not is anyone using a different technique to achieve this?

Many thanks,

Raoul

In your CI/release pipeline, you could use flyctl to SSH into your machine, download a migration tool, perform the migration, then delete the tool.

Effectively what [deploy] release_command does is run fly machine run for you. You can run this command yourself, with a different image, or even a different Dockerfile.