{"action":"created","issue":{"url":"https://api.github.com/repos/yacy/yacy_search_server/issues/97","repository_url":"https://api.github.com/repos/yacy/yacy_search_server","labels_url":"https://api.github.com/repos/yacy/yacy_search_server/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/yacy/yacy_search_server/issues/97/comments","events_url":"https://api.github.com/repos/yacy/yacy_search_server/issues/97/events","html_url":"https://github.com/yacy/yacy_search_server/pull/97","id":197240582,"number":97,"title":"Added entrypoint script for docker to catch SIGTERM","user":{"login":"m0se","id":2543808,"avatar_url":"https://avatars.githubusercontent.com/u/2543808?v=3","gravatar_id":"","url":"https://api.github.com/users/m0se","html_url":"https://github.com/m0se","followers_url":"https://api.github.com/users/m0se/followers","following_url":"https://api.github.com/users/m0se/following{/other_user}","gists_url":"https://api.github.com/users/m0se/gists{/gist_id}","starred_url":"https://api.github.com/users/m0se/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m0se/subscriptions","organizations_url":"https://api.github.com/users/m0se/orgs","repos_url":"https://api.github.com/users/m0se/repos","events_url":"https://api.github.com/users/m0se/events{/privacy}","received_events_url":"https://api.github.com/users/m0se/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-22T18:42:02Z","updated_at":"2016-12-30T11:39:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/yacy/yacy_search_server/pulls/97","html_url":"https://github.com/yacy/yacy_search_server/pull/97","diff_url":"https://github.com/yacy/yacy_search_server/pull/97.diff","patch_url":"https://github.com/yacy/yacy_search_server/pull/97.patch"},"body":"The startYaCy.sh script does not catch SIGTERM from `docker stop` so the instance is killed after the `docker stop` command times out. \r\n\r\nThe entrypoint script invokes stopYaCy.sh when it receives a SIGTERM and shuts down YaCy in a clean fashion.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/yacy/yacy_search_server/issues/comments/269762192","html_url":"https://github.com/yacy/yacy_search_server/pull/97#issuecomment-269762192","issue_url":"https://api.github.com/repos/yacy/yacy_search_server/issues/97","id":269762192,"user":{"login":"luccioman","id":13980734,"avatar_url":"https://avatars.githubusercontent.com/u/13980734?v=3","gravatar_id":"","url":"https://api.github.com/users/luccioman","html_url":"https://github.com/luccioman","followers_url":"https://api.github.com/users/luccioman/followers","following_url":"https://api.github.com/users/luccioman/following{/other_user}","gists_url":"https://api.github.com/users/luccioman/gists{/gist_id}","starred_url":"https://api.github.com/users/luccioman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luccioman/subscriptions","organizations_url":"https://api.github.com/users/luccioman/orgs","repos_url":"https://api.github.com/users/luccioman/repos","events_url":"https://api.github.com/users/luccioman/events{/privacy}","received_events_url":"https://api.github.com/users/luccioman/received_events","type":"User","site_admin":false},"created_at":"2016-12-30T11:39:35Z","updated_at":"2016-12-30T11:39:35Z","body":"Hi @m0se , in the meantime I [fixed](https://github.com/yacy/yacy_search_server/commit/1df558a6c6c86b96dd87987f7f8b87ad12b901c4) YaCy shutdown hook to properly terminate the Java process on SIGTERM signal.\r\nI just experimented with using `exec` in startYaCy.sh when -d option is set, and by using the \"exec form\" of the docker CMD (i.e. CMD [\"/bin/sh\",\"/opt/yacy_search_server/startYACY.sh\",\"-d\"]) and this way `docker stop` seems now to properly stop YaCy server. A bit more testing is needed before committing, but don't you think this way is even more generic (no new docker specific script needed) and should be preferred? \r\n "}}
{"actor":{"display_login":"luccioman"}}