3 months ago
I've setup my Rails app and the project as described in the Rails hosting guide. I've chosen to use the single postgres instance option. I've followed the guidance here (https://docs.railway.com/guides/rails#option-2-single-database-mode-recommended-for-most-apps) but the bin/jobs service never starts.
I've added the custom start command, I added the DATABASE_URL variable to it.
Only thing I'm a little unclear about is whether i've actually accomplished "Connect it to the same PostgreSQL database your main app uses". It's very vague guidance, I assumed it means add that DATABASE_URL variable which I did.
Anyone done this before and have some guidance for me?
Much appreciated!
2 Replies
Status changed to Awaiting Railway Response Railway • 3 months ago
3 months ago
Attach the same postgres to the bin/jobs service and set its DATABASE_URL to the same referenced postgres variable your web service uses (not a pasted URL)....Also copy over the other required env vars so the worker doesn’t exit immediately.
dharmateja
Attach the same postgres to the bin/jobs service and set its DATABASE\_URL to the same referenced postgres variable your web service uses (not a pasted URL)....Also copy over the other required env vars so the worker doesn’t exit immediately.
3 months ago
Thanks for the reply.
this "Attach the same postgres to the bin/jobs service" is the unclear part. I've read the docs, which say the same thing but don't necessarily say what that means. I've set the DATABASE_URL to the service reference database url. but the service still will not start.
I think something is missing in the "Attach . . ." part. I've done everything mentioned in the docs.
Attachments