R
Railwayβ€’4mo 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β€’4mo ago
Project ID: 45499fe6-6ec5-43b9-aca6-872b5076de23
Brody
Brodyβ€’4mo ago
it fails on startup
please provide error messages
Darryl
Darrylβ€’4mo ago
It doesn't provide an error message even wrapping it within a try/catch block
No description
Darryl
Darrylβ€’4mo ago
The console log isn't true btw Hitting the endpoint I get a 503 error
Brody
Brodyβ€’4mo ago
you need to listen on the PORT environment variable
Darryl
Darrylβ€’4mo ago
Let me try that!
Darryl
Darrylβ€’4mo 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β€’4mo ago
what did you set PORT to in railway?
Darryl
Darrylβ€’4mo ago
8000
Brody
Brodyβ€’4mo ago
still 503? make sure the app is also listing on host 0.0.0.0
Darryl
Darrylβ€’4mo ago
I lied. My client wasn't using the secure protocol when connecting to the websocket. Thank you @Brody πŸ™πŸΎ
Brody
Brodyβ€’4mo ago
sounds goods!
Darryl
Darrylβ€’4mo ago
But a quick question. I'm not seeing any of the logging within the deploy logs
Brody
Brodyβ€’4mo ago
are you logging unbuffered to stdout / stderr?
Darryl
Darrylβ€’4mo ago
I believe so if console.log is unbuffered?
Brody
Brodyβ€’4mo ago
with nodejs, yes with bun, no clue