sergey
sergey
RRailway
Created by sergey on 2/1/2024 in #✋|help
Zero Downtime deployments?
Hey there! I'm experience constant downtime of ~5-20 seconds for the service every time the new version is being deployed. I don't see any logs in the observability during the downtime, so looks like request is not reaching the containers. I have a health-check endoint and it feels like it's being ignored. If I deliberately start returning 500 from the health check what railway does it shuts down the old deployment and all requests coming towards the app are failing, even though the new deployment healthchecks didn't succeed. Hence the app is just down. Am I missing something in my setup?
16 replies
RRailway
Created by sergey on 5/6/2023 in #✋|help
Running DB migrations during CI/CD pipeline
Hey there 👋 I've been looking into the proper way of running DB migrations (with Prisma in my case) as a part of deployment process. Trying to understand what's the proper phase for this on Railway. E.g. Heroku has the "Release" phase defined specifically for this task https://devcenter.heroku.com/articles/release-phase. I've seen that in one of your templates migrations are ran during the build phase https://github.com/railwayapp-templates/nextjs-prisma/blob/main/package.json#L7, which works, but doesn't look like the best solution, since build and release are kinda separate phases. And running migrations via railway cli from local computer doesn't look very good either. Did I miss any other piece of documentation? What would be the general advice for such cases? Thanks!
23 replies