Open raedwa01 opened 3 years ago
Have you solved this issue?
this package does not handle this case well, my guess is that it sends some super-kill signal. anyway, I got a similar setup to work (on mac/linux) using background jobs and npm pre-script:
"start:proxy": "docker-compose -f reverse-proxy/docker-compose.yml up",
"prestart": "yarn start:proxy &",
"start": "nx serve",
In my case I wanted the reverse-proxy container to stop when I abort the start command so I ran it without the -d
I have my config set like the following:
When I run my code using
npm run start:dev
it will create my docker in the prestart, call the npm-run-all which calls the run:dev. Since the node runs with --watch (or even without for that matter since node runs until canceled) when I stop it with ctrl-c it stops the whole process. the start:dev:teardown doesn't run at all.I was able to get around it using
kill -s TERM PID
, but that takes time to lookup the PID and run it in a second window. Is there some way to get the next item to still run after a ctrl-c is passed?