concurrently icon indicating copy to clipboard operation
concurrently copied to clipboard

Teardown command?

Open FezVrasta opened this issue 2 months ago • 2 comments

I'm trying to run a docker container along with a node.js server, and I would like to stop the container when the user stops the node.js server script.

"dev": "concurrently 'node server.js' 'docker start -i database'"

Unfortunately Docker doesn't properly shuts down the container when CTRL+C is pressed, even though it does it when I run the docker command directly.

Would it be possible to add a --teardown option that allows to specify a script to run when the process is interrupted (CTRL+C is pressed)?

"dev": "concurrently --teardown 'docker kill database' 'node server.js' 'docker start -i database'"

FezVrasta avatar Apr 25 '24 09:04 FezVrasta