R
Railwayβ€’10mo ago
Darryl

Docker builds but fails to start application

Hey πŸ‘‹πŸΎ when I deploy my Dockerfile on Railway it builds ok but it fails on startup. However building & starting the Dockerfile locally it works just fine. Would anyone know why this could be? For what it's worth I'm using a Bun's docker image..
16 Replies
Percy
Percyβ€’10mo ago
Project ID: 45499fe6-6ec5-43b9-aca6-872b5076de23
Brody
Brodyβ€’10mo ago
it fails on startup
please provide error messages
Darryl
DarrylOPβ€’10mo ago
It doesn't provide an error message even wrapping it within a try/catch block
No description
Darryl
DarrylOPβ€’10mo ago
The console log isn't true btw Hitting the endpoint I get a 503 error
Brody
Brodyβ€’10mo ago
you need to listen on the PORT environment variable
Darryl
DarrylOPβ€’10mo ago
Let me try that!
Darryl
DarrylOPβ€’10mo ago
Hey this is still throwing an error. I've even set my own port manually within Railway itself
No description
No description
Brody
Brodyβ€’10mo ago
what did you set PORT to in railway?
Darryl
DarrylOPβ€’10mo ago
8000
Brody
Brodyβ€’10mo ago
still 503? make sure the app is also listing on host 0.0.0.0
Darryl
DarrylOPβ€’10mo ago
I lied. My client wasn't using the secure protocol when connecting to the websocket. Thank you @Brody πŸ™πŸΎ
Brody
Brodyβ€’10mo ago
sounds goods!
Darryl
DarrylOPβ€’10mo ago
But a quick question. I'm not seeing any of the logging within the deploy logs
Brody
Brodyβ€’10mo ago
are you logging unbuffered to stdout / stderr?
Darryl
DarrylOPβ€’10mo ago
I believe so if console.log is unbuffered?
Brody
Brodyβ€’10mo ago
with nodejs, yes with bun, no clue
Want results from more Discord servers?
Add your server