Exit Code
rafchik-dipstick
HOBBYOP

3 months ago

Whats the way to get the reason why my server restarts under bursts, how to get exit code - I can see only app logs, not why docker restarting

Solved

2 Replies

Railway
BOT

3 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


rafchik-dipstick
HOBBYOP

3 months ago

Found working strategy for me - wrap docker like this inside Dockerfile

Wrap node to emit exit code even on hard failures
CMD ["sh", "-c", "node dist/server.js & pid=$!; wait $pid; code=$?; echo \"[WRAPPER] node exited status=$code\" >&2; sleep 1; exit $code"]

Status changed to Solved rafchik-dipstick 3 months ago


Loading...