{"id":30443466,"url":"https://github.com/cakegit/dockerhook","last_synced_at":"2025-10-08T11:08:33.407Z","repository":{"id":310120500,"uuid":"1038736451","full_name":"cakeGit/DockerHook","owner":"cakeGit","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-16T08:17:49.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-23T09:15:46.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cakeGit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-15T18:21:04.000Z","updated_at":"2025-08-16T08:17:52.000Z","dependencies_parsed_at":"2025-08-15T22:42:54.787Z","dependency_job_id":"c0f47a9d-b84c-4b7e-80f0-472fed3f4093","html_url":"https://github.com/cakeGit/DockerHook","commit_stats":null,"previous_names":["cakegit/dockerhook"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cakeGit/DockerHook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cakeGit%2FDockerHook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cakeGit%2FDockerHook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cakeGit%2FDockerHook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cakeGit%2FDockerHook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cakeGit","download_url":"https://codeload.github.com/cakeGit/DockerHook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cakeGit%2FDockerHook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278931654,"owners_count":26070789,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-08-23T09:15:43.506Z","updated_at":"2025-10-08T11:08:33.363Z","avatar_url":"https://github.com/cakeGit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DockerHook Frontend (Express)\n\nSmall Express service that exposes a read-only view of a docker-compose YAML\nfile and a secure webhook endpoint which writes a trigger file (no SSH, no\ndocker control). Intended to be run on the same host as your containers (Debian)\nand consumed by CI/GitHub to notify the server to update.\n\nQuick start\n\n1. Install dependencies:\n\n```powershell\ncd C:\\GitHub\\DockerHook\nnpm install\n```\n\n2. Copy and edit `.env.example` to `.env` and set `AUTH_TOKEN`, `COMPOSE_PATH`,\n   and `TRIGGER_DIR`.\n\n3. Start the service:\n\n```powershell\nnpm start\n```\n\nEndpoints\n\n- GET /compose — returns parsed compose as JSON with metadata (mtime, size).\n- GET /compose/raw — returns raw YAML (content-type: text/yaml).\n- POST /webhook — write a trigger file into `TRIGGER_DIR` (requires auth token).\n  Returns 202.\n- GET /health — basic health check.\n\nSecurity\n\n- Token auth: set `AUTH_TOKEN` and include header\n  `Authorization: Bearer \u003ctoken\u003e` or `x-api-token: \u003ctoken\u003e` for protected\n  endpoints.\n- Rate limiting is enabled per-IP.\n\nSystemd example\n\nSave the file `systemd/dockerhook.service` as\n`/etc/systemd/system/dockerhook.service` and edit paths as needed.\n\nWatcher\n\nThis repo includes `src/watcher.js` — a simple polling watcher that consumes\n`trigger_*.json` files from the `TRIGGER_DIR`, moves them into a `processing/`\nfolder, runs an update command (default\n`docker compose pull \u0026\u0026 docker compose up -d`) and then moves the trigger into\n`processed/` or `failed/`.\n\nConfigure via environment variables in the systemd unit or `.env`:\n\n- `COMPOSE_DIR` — working directory for the update command (defaults to the\n  directory containing `COMPOSE_PATH`).\n- `UPDATE_CMD` — command to run when processing a trigger (defaults to\n  `docker compose pull \u0026\u0026 docker compose up -d`).\n\nBe careful: the watcher actually runs the update command, so run it under a user\nwith appropriate Docker permissions and test carefully.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcakegit%2Fdockerhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcakegit%2Fdockerhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcakegit%2Fdockerhook/lists"}