citizenofruins
citizenofruins
RRailway
Created by citizenofruins on 12/18/2023 in #✋|help
Service can't connect to new DATABASE_URL after Postgres plugin migration
After migrating to new Postgres service one of the main services can't start because of error in Prisma: Error: P1001: Can't reach database server at viaduct.proxy.rlwy.net:25515 both on production and dev environment. Other services run without problems and connect to the new database with same DATABASE_URL, one of which is also using Prisma. This service fails with both DATABASE_URL and DATABASE_PRIVATE_URL, others run fine. Project ID: 24e91f39-8c4b-4005-b2fa-bcb47c44b717 Service ID: f1410390-6a6b-4024-b742-814f56f1afc6
6 replies
RRailway
Created by citizenofruins on 5/12/2023 in #✋|help
How to run command or script right AFTER deployment is live
This is Next.js app. I need to do PUT https://myapp.com/api/inngest on my own app, which will in turn register my inngest functions in external service https://www.inngest.com/docs/deploy. I was thinking about triggering PUT request in package.json poststart script but obviously at that moment it is not guaranteed that the new app is live (how would the /health endpoint work otherwise). It is important that when PUT request is triggered that the new app is live; or more precisely that all traffic to app's public domain is directed to newly deployed app instead of the old one. It is also important to do this request as soon as possible, so some arbitrary timeout is not acceptable here. How can this be achieved? Is it possible to do this via nixpacks config? Am I missing something obvious here?
12 replies