marcopeocchi / yt-dlp-web-ui

A terrible web ui and RPC server for yt-dlp. Designed to be self-hosted.
GNU General Public License v3.0
820 stars 85 forks source link

cannot stop main.js gracefully? #3

Closed deluxghost closed 2 years ago

deluxghost commented 2 years ago

I'm using docker deployment, the docker stop takes longer than 10 seconds to be done

I think node dist/main.js ignores SIGTERM, so docker must wait until the default 10s timeout and kill the container

marcopeocchi commented 2 years ago

It shouldn't be too much trouble ti fix. Forcing a custom handler with e.g

process.once('SIGTERM' , () => stop routine)

When I'll have some spare time I'll try to fix it.

marcopeocchi commented 2 years ago

I'm using docker deployment, the docker stop takes longer than 10 seconds to be done

I think node dist/main.js ignores SIGTERM, so docker must wait until the default 10s timeout and kill the container

I pushed a possible fix. Now docker stops the container immediately as suggested.