Closed alok87 closed 5 years ago
Embed migrations in the binary (e.g. using packr) and use it as a library.
Or use an init container.
We don't use packer
. Then do I need to make the binary be part of Docker image and then execute the binary in the entrypoint to apply migrations? Then i need to copy migration files also in Dockerfile also
Note the missing e: packr, not packer.
Check the README in this repo for instructions on how to use it as a library.
On Mon, 26 Nov 2018, 12:50 Alok Kumar Singh <notifications@github.com wrote:
We don't use packer. Then do I need to make the binary be part of Docker image and then execute the binary in the entrypoint to apply migrations? Then i need to copy migration files also in Dockerfile also
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rubenv/sql-migrate/issues/125#issuecomment-441612769, or mute the thread https://github.com/notifications/unsubscribe-auth/AACnmKzDnGTOtL3CglWaTkLEomCUqyT4ks5uy9WQgaJpZM4Yy1V_ .
Thanks let me try out.
We run our service in kubernetes. What is the right way to execute migrations using
sql-migrate
as part of deployment to kubernetes.We need to have
sql-migrate
binary in our Dockerfile or entrypoint?