Y
Y
yativ_sobb2022-01-28 11:16:00
Node.js
yativ_sobb, 2022-01-28 11:16:00

What is the best way to run multiple node workers in Docker?

I had a question, how best to start the workers, and the service on docker, so that later I don’t restart the processes if some kind of worker crashes? There is also the question of how to share one node_modules between them, no matter how much I want to copy once again.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2022-01-28
@yativ_sobb

As an option, give each worker its own docker container. And mount the node_modules common to them as a volume (I suspect you can even mount it as read-only).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question