Cal not deploying correctly on Railway
I deployed Cal template on Railway, but when I open the URL, it is showing a blank page. The logs show a lot of errors. I have tried redeploying multiple times (and tried created a new project as well), but I am getting the same errors every time. Can someone please help?
Solution:Jump to solution
i tested a template deploy with the latest tag, and adding a
DATABASE_DIRECT_URL
variable and i can see that the migrations where ran56 Replies
Project ID:
bec0b4e9-7ab8-4fc1-bfd2-11b968fbdfa4
bec0b4e9-7ab8-4fc1-bfd2-11b968fbdfa4
this template? https://railway.app/template/cal
Yes
okay ill deploy it and see whats up
Okay, thank you!
did you provide your google api credential?
Yes
I just noticed some discrepancy on my Google Cloud Console. I'll make the changes and update you if it solves the issue.
I had not added my custom domain to my Railway project, but my Authorized redirect URIs were pointing to the custom domain on Google Cloud. I added the domain on Railway, but I am still getting the same blank screen when I open the URL.
have you followed their docs? https://cal.com/docs/introduction/quick-start/self-hosting/install-apps/google
Yes, I just rechecked all the steps again. The only change I made a few minutes ago was changing GOOGLE_LOGIN_ENABLED from false to true (I thought it might fix the issue).
One of the errors I am seeing in the logs a lot is:
So I went to the data tab in Railway, but it wasn't working. Spent a lot of time trying to figure out how to make it work, but then I saw a message in this server that I should use an external database client to access the database. I downloaded DBeaver, enabled external network in Postgres on Railway, entered all the details in DBeaver, but it couldn't connect to the database. So now I am back to the beginning :(
a redeploy of the database is required after enabling the tcp proxy for the very first time
Oh, okay. Trying that now.
are you still using the railway provided domain, or have you added a custom domain?
Added a custom domain
have you redeployed the cal service since then?
I believe I did, but I'll try again just to be sure
Postgres redeployment done, but DBeaver connection is still timing out.
are you sure you are using all the correct credentials?
Redeployed Cal service, same issue is still there
I noticed Railway did not automatically add the public host in Postgres service's variables:
Should I add it manually and redeploy?
nope, please don't that would only mess something else up
show me a screenshot of the public network section of the database service settings
that is an http domain, postgres does not use http, postgres uses tcp
that internal port looks wrong
it's 5432, you where close
I'm sorry, my bad. Fixed it.
okay now a redeploy is needed
Should I put these values in DBeaver?
Host: viaduct.proxy.rlwy.net
Port: 5432
Database: railway
Username: <taken from POSTGRES_USER variable>
Password: <taken from POSTGRES_PASSWORD variable>
5432 is the internal port, you need to use the public port (the bigger number)
Okay, connection was done successfully!
Looks like there are no tables?
maybe migrations didn't run for some reason
I wonder if cal changed something
Oh, is there anything I can do to check?
honestly no clue right now, I may have created the template, but I don't personally use it
Oh, okay
try deploying the template again?
Already tried it thrice 🥲
I'll try again
nah 3 times is good
I think the issue is linked to Cal. Found a thread on their server which might be linked to this:
hmmm, my template uses postgres 16
their offical self hosted docs for docker use postgres 16 https://github.com/calcom/docker/blob/main/docker-compose.yaml#L15
https://github.com/calcom/docker/issues/329 - looks like the current quick fix is to use v3.7.11 tag. They haven't released the docker image for the latest version.
GitHub
Issue with docker hub images · Issue #329 · calcom/docker
Hello Guys, i don't know why but last tag on docker hub is 3.7.16. The newest release on github is 3.8.0-rc https://hub.docker.com/r/calcom/cal.com/tags
okay swap the image in use to that tag
Just to confirm, I have to disconnect this and add the tag, right?
correct
Changed it to calcom/cal.com:v3.7.11. Redeploying now.
I see a lot of logs like this 👀
I hope it works.
migrations are running, thats good
It worked!
updated the template too temporarily, thanks for bringing this up
Thanks a lot for helping!
I'll keep an eye on their releases. I hope it is fixed soon. Will ping you if there's an update.
sounds good!
Solution
i tested a template deploy with the latest tag, and adding a
DATABASE_DIRECT_URL
variable and i can see that the migrations where ranWhat value to put in it?
the same as the
DATABASE_URL
variable
Trying this with calcom/cal.com
It is working!
Thanks!
awesome, then I'll add that variable to the public template and go back to the latest tag
Hi @Master Adit I just see you were running in the same issues as I did when I’ve tried cal. Would you please be available for assisting me via dm when I do a retry, please
Looking forward to receive your expertise