kratos
kratos copied to clipboard
Provide an option to run migrations before startup for the kratos serve command for single instance setups
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [ ] This issue affects my Ory Cloud project.
- [ ] I have joined the Ory Community Slack.
- [ ] I am signed up to the Ory Security Patch Newsletter.
Describe your problem
I have a simple single instance setup of kratos and right now I have to run the kratos migrate command in my deployment pipeline (which also requires giving IP access to the database outside of the cloud) before a deployment.
Unfortunately, the way my apps are hosted (Azure Container Apps), I have not found a way to easily run the migrate command on startup in a reliable manner.
Describe your ideal solution
I would like a CLI option in the serve flag to auto run the migrate command on startup and also provide a startup health check so that the readiness probe does not cause a failure restart loop.
Workarounds or alternatives
None
Version
0.10.1
Additional Context
No response