{"id":17041930,"url":"https://github.com/cloudhead/spinsv","last_synced_at":"2025-04-12T14:40:36.146Z","repository":{"id":5787516,"uuid":"7001666","full_name":"cloudhead/spinsv","owner":"cloudhead","description":"a stateless service runner inspired by runit","archived":false,"fork":false,"pushed_at":"2014-05-24T11:08:29.000Z","size":344,"stargazers_count":7,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-26T09:11:38.421Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudhead.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-04T15:02:09.000Z","updated_at":"2023-09-04T21:31:52.000Z","dependencies_parsed_at":"2022-09-04T22:00:47.217Z","dependency_job_id":null,"html_url":"https://github.com/cloudhead/spinsv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudhead%2Fspinsv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudhead%2Fspinsv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudhead%2Fspinsv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudhead%2Fspinsv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudhead","download_url":"https://codeload.github.com/cloudhead/spinsv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248582341,"owners_count":21128357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T09:14:13.948Z","updated_at":"2025-04-12T14:40:36.125Z","avatar_url":"https://github.com/cloudhead.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n  SPINSV\n\n\n    A service runner inspired by runsv.\n\n\n. background\n\n  A common need encountered when running services on a unix system is\n  to pipe the output of one service into the input of another, (often\n  a log service such as `svlogd`). This looks something like this:\n\n      #!/bin/sh\n\n      service | log-service\n\n  There are several problems with this approach, however:\n\n    * There is no monitoring: if either of the services die,\n      they aren't restarted.\n    * It's hard to inspect the state of the process pair,\n      especially if it goes down.\n    * Even if the script is restarted when either of the services\n      fails, this means the log service will cause a restart of the\n      other service if it dies.\n    * There is no single entry point to managing the process pair.\n\n  spinsv aims to solve these shortcomings by monitoring the processes\n  and providing a TCP console to access or change the process state.\n\n. rationale\n\n  To have a completely stateless[1] service runner configurable via\n  the command line.\n\n  1. spinsv doesn't need file system access for configuration\n     or operation.\n\n. building\n\n  $ make\n\n. running\n\n  $ spind --port 80\n\n  For spinsv, see 'spinsv --help'\n\n. example\n\n  Start the spind daemon on a remote host\n\n    $ ssh 10.0.1.32\n    $ spinsv --in.cmd  spind      \\\n             --in.arg '--port=80' \\\n             --out.cmd svlogd     \\\n             --out.arg /var/run/spind\n\n  Spawn a service via spind's HTTP interface. spinsv will open\n  a TCP control socket on port 9898.\n\n    $ curl -X POST 10.0.1.32/jobs -d \\\n        '{\"service\": {\"cmd\": \"redis-server\", \"args\": []},\n          \"logger\":  {\"cmd\": \"svlogd\", \"args\": [\"/var/run/redis/log\"]},\n          \"port\":    9898}'\n\n  The service runs under spinsv, we can verify that it is running:\n\n    $ netcat 10.0.1.32 9898\n    \u003e status\n    up 0 0\n    \u003e q\n\n    $ redis-cli -h 10.0.1.32 info\n    redis_version:2.6.11\n    ...\n\n. copyright\n\n  (C) 2012 Alexis Sellier \u003calexis@cloudhead.io\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudhead%2Fspinsv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudhead%2Fspinsv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudhead%2Fspinsv/lists"}