Docker Error even though bot still running

I have a very simple DockerFile that's starting my application. I also have set a start script (npm run start:prod). However, when it starts it shows logs with a lot of spaces and some other stuff that doesn't make sense: - The bars in Observability are also colored black instead of red and blue. - Errors in the console aren't showing fully (only the first line) and if I click Show More, it shows the second line and not the first of the error. Other lines are still missing. (not shown in image) - The container also "dies" but the bot still works. I'm new to Docker so I honestly don't understand why whatever is happening is happening (or the existing DockerFile either really...) :cryAqua:. Please help Project ID: 04769ebe-fd27-4d50-8fb1-05354c76d1c5 Here's my very basic DockerFile
FROM node:20.12.2

WORKDIR /usr/src/app

COPY package.json ./

RUN npm install --omit=dev

COPY . .

RUN npm run build

CMD [ "npm", "run", "start:prod" ]
FROM node:20.12.2

WORKDIR /usr/src/app

COPY package.json ./

RUN npm install --omit=dev

COPY . .

RUN npm run build

CMD [ "npm", "run", "start:prod" ]
and some package.json scripts
"build": "NODE_ENV=production tsc -p .",
"start:prod": "NODE_ENV=production node dist/index.js",
"build": "NODE_ENV=production tsc -p .",
"start:prod": "NODE_ENV=production node dist/index.js",
No description
34 Replies
Percy
Percy6mo ago
Project ID: 04769ebe-fd27-4d50-8fb1-05354c76d1c5
Brody
Brody6mo ago
check your service settings, if you're on the v2 runtime please switch to the legacy runtime, the v2 runtime seems to have some issues with logs at the moment
materwelon
materwelonOP6mo ago
kind of fixed stuff? I'm still so lost... It's also spamming logs for some reason. container still stopped but the bot still works
No description
No description
Brody
Brody6mo ago
where you running any replicas?
materwelon
materwelonOP6mo ago
nope. Just the main from github, deployed once.
materwelon
materwelonOP6mo ago
No description
materwelon
materwelonOP6mo ago
it says it's removing it but doesnt remove it.
materwelon
materwelonOP6mo ago
even more
No description
materwelon
materwelonOP6mo ago
oh. it did remove it finally. What are the docker errors though nope. it didnt remove it went active again
Brody
Brody6mo ago
docker errors?
materwelon
materwelonOP6mo ago
No description
materwelon
materwelonOP6mo ago
the first image here. container event died
materwelon
materwelonOP6mo ago
wait what. it changed from Stopping Container to container event died
No description
Brody
Brody6mo ago
well railway does run everything in containers after all
materwelon
materwelonOP6mo ago
yeah. but what are those errors after the container runs successfully? What is the spam of removing events without actually removing the deployment?
materwelon
materwelonOP6mo ago
I simply can't remove this one deployment at all. I remove it and it just doesnt go away
No description
materwelon
materwelonOP6mo ago
it logs that it removed it, but doesnt actually do it
Brody
Brody6mo ago
I have no clue, I would need to ask a team member
materwelon
materwelonOP6mo ago
:painbop: i appreciate the help
Brody
Brody6mo ago
!t
Duchess
Duchess6mo ago
New reply sent from Help Station thread:
This thread has been escalated to the Railway team.
You're seeing this because this thread has been automatically linked to the Help Station thread.
Brody
Brody6mo ago
I can't provide an ETA on their reply unfortunately since there is no set time frame for support on the hobby plan
materwelon
materwelonOP6mo ago
aha. someone else is also facing the same problem https://discord.com/channels/713503345364697088/1249523974967132243 no worries. I am going to try deleting the service all together and creating a new one MAYBE that works.
Brody
Brody6mo ago
I would appreciate if you could leave that service alone if possible?
materwelon
materwelonOP6mo ago
oo
Brody
Brody6mo ago
I understand that may not be possible given neither of us know when railway would be available to assist
materwelon
materwelonOP6mo ago
I have asked the project owner to wait a bit. They do need their bot. Will see
Brody
Brody6mo ago
did you say that the bot was online?
materwelon
materwelonOP6mo ago
Yep.
materwelon
materwelonOP6mo ago
so there's a problem with Railway it seems the project owner managed to delete the service (finally. he had been trying for a while but wasn't able to) I will try to deploy again
Brody
Brody6mo ago
yep
materwelon
materwelonOP6mo ago
removed the service and redid everything. Started with Legacy instead of V2 this time. Everything works great, no errors whatsoever.
Brody
Brody6mo ago
legacy will be deprecated soon so it would be best to switch to v2
Want results from more Discord servers?
Add your server