go-links
go-links copied to clipboard
Initial db migration failure causes trotto app to return 500 internal server error
The symptom and steps to reproduce:
- Launch trotto instance.
- Launch postgres instance.
- Trotto instance keeps returning 500 internal server error.
Root cause: When trotto app and postgres instance are written in one docker-compose file, both are launched almost simultaneously.
Solution: a: add health check to trotto instance, so it will eventually restarted, and DB migration after restart should success. b: add retry capability to the initial database migration process. c: inform users to make sure to launch database prior to trotto instance.