{"id":21607383,"url":"https://github.com/maccyber/dockerhub-webhook","last_synced_at":"2025-04-11T04:24:11.939Z","repository":{"id":57214072,"uuid":"72298805","full_name":"maccyber/dockerhub-webhook","owner":"maccyber","description":"Docker hub webhook","archived":false,"fork":false,"pushed_at":"2023-12-15T17:53:52.000Z","size":80,"stargazers_count":16,"open_issues_count":11,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-11T09:21:30.530Z","etag":null,"topics":["automated-builds","dockerhub","dockerhub-webhook","hub-docker-com","webhook"],"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/maccyber.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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}},"created_at":"2016-10-29T17:16:12.000Z","updated_at":"2022-03-10T05:35:39.000Z","dependencies_parsed_at":"2024-11-24T20:30:48.385Z","dependency_job_id":"57f35c83-4a9d-47de-bffb-90ba67486686","html_url":"https://github.com/maccyber/dockerhub-webhook","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/maccyber%2Fdockerhub-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maccyber%2Fdockerhub-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maccyber%2Fdockerhub-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maccyber%2Fdockerhub-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maccyber","download_url":"https://codeload.github.com/maccyber/dockerhub-webhook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248341081,"owners_count":21087566,"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":["automated-builds","dockerhub","dockerhub-webhook","hub-docker-com","webhook"],"created_at":"2024-11-24T20:30:17.021Z","updated_at":"2025-04-11T04:24:11.892Z","avatar_url":"https://github.com/maccyber.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/maccyber/dockerhub-webhook.svg?branch=master)](https://travis-ci.org/maccyber/dockerhub-webhook)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)\n[![Coverage Status](https://coveralls.io/repos/github/maccyber/dockerhub-webhook/badge.svg)](https://coveralls.io/github/maccyber/dockerhub-webhook)\n[![Code Climate](https://codeclimate.com/github/maccyber/dockerhub-webhook/badges/gpa.svg)](https://codeclimate.com/github/maccyber/dockerhub-webhook)\n\n# dockerhub-webhook\n\n**Unsupported!** See [maccyber/micro-dockerhub-hook](https://github.com/maccyber/micro-dockerhub-hook) instead.\n\nAutomatic [docker](https://www.docker.com) deployment with [webhooks](https://docs.docker.com/docker-hub/builds/#webhooks).\n\ndockerhub-webhook listens to incoming HTTP POST-requests from hub.docker.com and triggers your specified script(s).\n\n## Features\n\n* Lightweight\n* Pretty simple setup process\n* Can be runned in a docker container\n* Supports updating multiple docker images\n* Scripts can trigger docker or docker-compose\n* Used in production\n* Good logging\n\n# Create a token\nCreate a secret token with ``openssl``, ``uuidgen`` or something else. Don't use any slashes since token is going to be used in the URL.\n\n```sh\nexport TOKEN=$(uuidgen)\necho $TOKEN\n```\n\n# Installation alternatives\n\n## 1. Run on host\n\n### Install\n\nNodejs and npm must be installed.\n\n```sh\ngit clone http://github.com/maccyber/dockerhub-webhook\ncd dockerhub-webhook\nnpm i\n```\n\n### Edit config\n\nSee [config/index.js](config/index.js)\n\n```sh\nvim config/index.js\n```\n\n### Configure repos and scripts\n\nSee [scripts/index.js](scripts/index.js)\n\n```sh\nvim scripts/index.js\n```\n\n### Start dockerhub-webhook\n```sh\nnpm start\n```\n\n## 2. Run with docker-compose\n\nGit clone\n```sh\ngit clone http://github.com/maccyber/dockerhub-webhook\n```\n\nAdd secret token in dockerhub.env with\n```sh\nvim dockerhub.env\n```\n\nStart with\n```sh\ndocker-compose up -d\n```\n\n## 3. Run from docker hub\n\nGit clone\n```sh\ngit clone http://github.com/maccyber/dockerhub-webhook\n```\n\nStart with\n```sh\ndocker run -d \\\n  -p 3000:3000 \\\n  -e SERVER_PORT=3000 \\\n  -e TOKEN=${token} \\\n  -e ROUTE=/api \\\n  -v ${PWD}/scripts:/src/scripts \\\n  -v /var/run/docker.sock:/var/run/docker.sock \\\n  --name dockerhub-webhook \\\n  maccyber/dockerhub-webhook \n```\n\n# Configuration on docker hub\n\nGo to https://hub.docker.com/ -\u003e your repo -\u003e Webhooks\n\nAdd a webhook like on the following image.\n\n![alt tag](dockerhook.png)\n\nReplace ``example.com`` with the domain of your server or it's ip address.\n\nReplace ``abc123`` with your secret token.\n\ndocker-hook listens to port 3000 by default. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaccyber%2Fdockerhub-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaccyber%2Fdockerhub-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaccyber%2Fdockerhub-webhook/lists"}