Hi!
As the title says, I am trying to look for a way to run release_command in a different image than the deploying image.
In Dockerfile, I am building a node project, and eventually output the server files without node_modules.
But I also want to run database migration in release_command, which requires node_modules exist.
I have tried installing dependencies when running release_command, but it ended up with running out of memory and can’t deploy.
So I am thinking if I can build an image with node_modules installed specifically for migration, and build another image without node_modules for deploy.
I also couldn’t find a way to increase the memory of the release_command machine (so I can install during release_command).
Hi… There isn’t a way to do exactly that, as far as I know, but you can get pretty close with a custom ephemeral machine (one of the Fly.io platform’s best features, )…
Since it sounds like you may already have a plan for building the different images and then pushing them each to the registry, the remaining steps would go roughly along the following lines: