hypermedia-app / hypertest-docker

Docker images for running tests against Hypermedia APIs
MIT License
1 stars 1 forks source link

Accept SIGTERM #2

Open thewilkybarkid opened 4 years ago

thewilkybarkid commented 4 years ago

Seen the same problem as https://github.com/hypermedia-app/generic.hypermedia.app/issues/46.

Refs https://github.com/libero/article-store/pull/104#issuecomment-564021656.

tpluscode commented 4 years ago

I'm not sure. This container is not using sh -c entrypoint and I seem to have no trouble stopping it with SIGTERM

thewilkybarkid commented 4 years ago

Had to add --init in https://github.com/libero/article-store/commit/d2b650188115f3ae89f12220f7493832762a0a38 to get it to work...

giorgiosironi commented 4 years ago

The ENTRYPOINT is:

"Entrypoint": [
                "node",
                "entrypoint.js"
            ],

so the difference with https://github.com/hypermedia-app/generic.hypermedia.app/issues/46 is that there is no npm that can receive signals, but only node. Would have to setup signal handlers in code usually to deal with SIGTERM.

Can reproduce by removing --init from https://github.com/libero/article-store/pull/104 but not sure what to run to have a minimal test case just with this image.