Reputation: 4686
I'm using docker-compose
to organize containers for a JS application.
The source container sports command: npm start
, pretty standard, to spin up the live application. However, that timeouts when I ask it to stop.
I was wondering if it's possible to have docker-compose stop
to run a command inside the container - that could properly terminate the application.
Upvotes: 0
Views: 110
Reputation: 1640
docker-compose stop
just sends a SIGTERM
to your container and if it does not stop after 10secs (configurable) SIGKILL
follows. So if you want to customize this behavior, you should handle signal inside your entrypoint
(if you have one).
Upvotes: 2