how do I run postgres locally?
I copied this hono/bun/postgres/drizzle template locally https://railway.app/template/hIiRi5 and renamed and cloned the repo locally. How do I run the db migrations/seeding locally using railway up commands?
railway up bun run db:generate
does not work but if I copy the public db url to a .env file, I'm able to connect to the db via my CLI.Solution:Jump to solution
you would indeed need to use the public database URL when developing locally
9 Replies
Project ID:
a2ca1487-d15e-47b9-9817-8cf2ec0824f7
projectID: a2ca1487-d15e-47b9-9817-8cf2ec0824f7
you have to use railway run not railway up, railway up deploys
For example
railway run npm start
yep still running into an error.
im 'not sure how to make my server service connect to the db service.
if the server is running locally i can still make it point to the same public postgres db yeah?
Solution
you would indeed need to use the public database URL when developing locally
so my guess is you have to create a .env file and set to DATABASE_URL manually to DATABASE_PUBLIC_URL. you can't do railway run here
correct
ty! getting a hang of this thing. already getting my friends on it.
love to hear that!