4 months ago
Hello!
I am trying to use Railway to install Discourse, the open source forum software. I see other have tried and failed but I decided begginers luck may be on my side.
I am doing this via Docker Hub, i found here in the help station the correct way to enter it: discourse/base:release-stable. It connects and, according to it, it deploys successfully, so we are kind of there. However, the application wont run. When i try to access the public URL (whether railway's or my cutom domain, i always get the same error:
Application failed to respond
This error appears to be caused by the application.
If this is your project, check out your deploy logs to see what went wrong. Refer to our docs on Fixing Common Errors for help, or reach out over our Help Station.
If you are a visitor, please contact the application owner or try again later.
Request ID:
0_0CW1DqSIOe56uax0SSRg_2020806880
I thought the issue may have to do with the fact the Discourse, acccording to their installation instructions (https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md#5-install-prerequisites-for-docker-debianubuntu-based-distro-example) would need me to run this command:./discourse-setup
which is not possible in railway because we dont have SSH. Chat GPT said the command only sets some env vars, and as long as i set them, that step would not be necessary (i do not agree, i believe it does more than that). Well, i setup all the env vars but the app still wont run.
I checked the HTTP logs and this is what i see whenever i try to access the app:requestId:"yEpNwt2mTZy4HcTlgZbC1w_3165824431"
timestamp:"2025-01-25T02:58:41.271858465Z"
method:"GET"
path:"/"
host:"celebrated-commitment-production.up.railway.app"
httpStatus:502
upstreamProto:"HTTP/1.1"
downstreamProto:"HTTP/2.0"
responseDetails:"failed to forward request to upstream: connection dial timeout"
totalDuration:5055
upstreamAddress:"http://[fd12:1e08:e01a:0:a000:5:993c:347]:3000"
clientUa:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
upstreamRqDuration:5000
txBytes:4690
rxBytes:765
srcIp:"181.1.241.204"
edgeRegion:"us-east4"
Jan 24 23:58:46
GET
/favicon.ico
502
5.00s
requestId:"i0eNtCPJSaWW-6QLJ_WEiA_3165824431"
timestamp:"2025-01-25T02:58:46.502292000Z"
method:"GET"
path:"/favicon.ico"
host:"celebrated-commitment-production.up.railway.app"
httpStatus:502
upstreamProto:"HTTP/1.1"
downstreamProto:"HTTP/2.0"
responseDetails:"failed to forward request to upstream: connection dial timeout"
totalDuration:5000
upstreamAddress:"http://[fd12:1e08:e01a:0:a000:5:993c:347]:3000"
clientUa:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
upstreamRqDuration:5000
txBytes:120
rxBytes:699
srcIp:"181.1.241.204"
edgeRegion:"us-east4"
When i check the logs, I see a long string of "starting container - stopping container":
Starting Container
level:"info"
deployment: 10a9d5a6-3bb1-430f-9718-a578f44c6e5f
replica: a4348f6a-d1b3-41e2-b530-1d2fdee0b752
service: e0d241ea-548e-4975-a950-2d4489983bdf
View in ContextCopy as JSON
Stopping Container
level:"info"
deployment: a9934dbd-58d6-4f8d-85c7-f3bb12f4b4c8
replica: 32ddbfb8-97ff-4be6-9c0c-930636478620
service: e0d241ea-548e-4975-a950-2d4489983bdf
View in ContextCopy as JSON
So, here I am, with no idea where to go to continue debugging. All fixes and steps provided by discourse requiere SSH access (still, I don't know what my problem is).
I also installed railway cli, and tried to run "railway logs" in the terminal, and the response was
Starting container...
and it died there.
Discourse is a great software and a prime candidate for being used in Railway, but i am affraid there are no records of those who tried ever succeding.
Any pointers? I am deffinitely not an expert here, so anything helps.
Thanks!
4 Replies
4 months ago
added the additional info by editing the post (can't delete this comment)
4 months ago
Hey, you can use predeploy/start commands to run the ./discourse-setup
script.
See our docs: https://docs.railway.com/guides/pre-deploy-command
Status changed to Awaiting User Response railway[bot] • 4 months ago
3 months ago
Didn't work, I guess because the command prompts for answers to establish some settings.
Status changed to Awaiting Railway Response railway[bot] • 3 months ago
3 months ago
Yep unfortunately I don't think you're gonna be able to to install discourse because you will need to be able to execute the script. Luckily we're working on SSH this quarter so you'll be able to do this soon.
- Angelo
Status changed to Awaiting User Response railway[bot] • 3 months ago
Status changed to Solved angelo • 3 months ago