{"id":21202375,"url":"https://github.com/taonity/docker-webhook","last_synced_at":"2026-05-11T02:50:11.682Z","repository":{"id":192866160,"uuid":"686686406","full_name":"taonity/docker-webhook","owner":"taonity","description":"The docker image that allows you to keep your docker compose projects up-to-date","archived":false,"fork":false,"pushed_at":"2024-09-27T00:33:00.000Z","size":10,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T15:11:16.306Z","etag":null,"topics":["bash","docker"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/taonity.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}},"created_at":"2023-09-03T16:08:36.000Z","updated_at":"2023-10-13T16:52:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec8ac913-03e3-45cc-9a02-d2a8dc4e95a3","html_url":"https://github.com/taonity/docker-webhook","commit_stats":null,"previous_names":["taonity/docker-webhook"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taonity%2Fdocker-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taonity%2Fdocker-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taonity%2Fdocker-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taonity%2Fdocker-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taonity","download_url":"https://codeload.github.com/taonity/docker-webhook/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243655306,"owners_count":20326069,"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":["bash","docker"],"created_at":"2024-11-20T20:15:38.596Z","updated_at":"2026-05-11T02:50:11.678Z","avatar_url":"https://github.com/taonity.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[generaltao725/docker-webhook](https://hub.docker.com/repository/docker/generaltao725/docker-webhook/general) is a docker image that allows you to keep your docker compose projects up-to-date. It listens for DockerHub webhooks, and on an incoming webhook, it pulls an image, extracts the docker-compose file, and then starts/restarts the docker compose project.\n\nThe image is based on [thecatlady/webhook](https://hub.docker.com/r/thecatlady/webhook) image and wraps [adnanh/webhook](https://github.com/adnanh/webhook) application.\n\n### Usage\nAn example of the usage of the image can be found in a [test](test/run-project-on-post-request/docker-compose.yml).\n\n### Prerequiremnts \n - Target images must have a docker compose project placed into `/docker` directory of the image\n - Docker compose yml file must be named as `docker-compose.yml`\n - Works only with public images from DockerHub\n - Is triggered only on an image being updated with `latest` tag\n - Requires a cache folder `/etc/webhook/cache` that should be mounted in the docker host filesystem.\n\n### Configuration \n - `WEBHOOK_SECRET` - you have to create a webhook with a secret placed into its URL `http://\u003cserver_ip\u003e/hooks/\u003cwebhook_secret\u003e/docker-webhook`. The secret can be then loaded as an environment variable `WEBHOOK_SECRET` in `docker-webhook` service. The secret is used for security purposes.\n - `DOCKER_USERNAME` - an env var that contains your DockerHub username.\n - `DEPLOY_DEFAULT_ENV` - (optional) the default environment to deploy to when no environment is specified in the webhook payload. Defaults to `stage` if not set.\n - `project-whitelist.list` - is a file with target image names being listed (without owner name). The tool will check if the list contains the image name from webhook details and will proceed         only on finding a match. Each image name should be written from the new line. The file should placed in `shared/config` folder and the `shared` folder should be mounted into `/etc/webhook/shared` of the container.\n - `envs` - a folder that loads env vars for each docker compose project. Envs should be stored in `.envs` file a placed in `shared/\u003cimage_name\u003e-\u003cenvironment\u003e/` folder (e.g., `shared/envs/myapp-stage/` or `shared/envs/myapp-prod/`). The `shared` folder should be mounted into `/etc/webhook/shared` of the container. This configuration is optional.\n - `docker-compose.override.yml` - (optional) you can place environment-specific Docker Compose override files in `shared/envs/\u003cimage_name\u003e-\u003cenvironment\u003e/docker-compose.override.yml`. These override files will be automatically applied when deploying to that environment, allowing you to customize ports, volumes, environment variables, or any other Docker Compose settings per environment.\n\n### Multi-Environment Deployments (Stage/Prod)\n\nThe webhook service supports deploying to multiple environments (e.g., stage and prod) from the same Docker image:\n\n- **Default behavior**: By default, webhooks deploy to the `stage` environment (or whatever `DEPLOY_DEFAULT_ENV` is set to).\n- **Production deployments**: To deploy to production, include an `environment` field with value `prod` in your webhook payload.\n- **Environment isolation**: Each environment maintains separate:\n  - Cache directories: `/etc/webhook/cache/\u003cproject\u003e-\u003cenvironment\u003e`\n  - Docker Compose project names: `\u003cproject\u003e-\u003cenvironment\u003e`\n  - Environment variable files: `shared/envs/\u003cproject\u003e-\u003cenvironment\u003e/`\n  - Docker Compose override files: `shared/envs/\u003cproject\u003e-\u003cenvironment\u003e/docker-compose.override.yml`\n\n**Example webhook payload for production deployment:**\n```json\n{\n  \"push_data\": {\n    \"tag\": \"latest\"\n  },\n  \"repository\": {\n    \"name\": \"myapp\"\n  },\n  \"environment\": \"prod\"\n}\n```\n\nWhen sending the webhook manually to trigger a production deployment, add `\"environment\": \"prod\"` to the JSON payload. Automatic webhooks from DockerHub will deploy to stage by default.\n\n### GitHub Actions Integration\n\nThe tool provides a reusable GitHub Actions workflow so you can trigger deployments from CI/CD pipelines and see deployment logs directly in GitHub.\n\n#### Setup\n\n1. Add these secrets to your GitHub repository (or organization):\n   - `WEBHOOK_URL` — base URL of your webhook server (e.g. `https://myserver.com:9000`)\n   - `WEBHOOK_SECRET` — the webhook secret used in the URL path\n\n2. If using DockerHub callbacks, you can **disable them** and rely on GitHub Actions instead for full control and log visibility.\n\n#### Usage\n\nReference the reusable workflow from your project's release pipeline:\n\n```yaml\njobs:\n  release:\n    # ... your build \u0026 push steps ...\n\n  deploy-stage:\n    needs: release\n    uses: taonity/docker-webhook/.github/workflows/deploy.yml@main\n    with:\n      project_name: myapp\n      environment: stage\n    secrets:\n      WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}\n      WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }}\n```\n\nThe deployment logs from docker-webhook are streamed back and visible in the GitHub Actions run.\n\nSee a full [example](.github/examples/artist-insight-service-release.yml) for artist-insight-service.\n\n#### Manual deployments\n\nYou can trigger deployments manually from the **docker-webhook** repo's Actions tab using the \"Deploy (manual)\" workflow. Select the project name and environment from the UI.\n\n#### Log visibility\n\nSince the webhook is configured with `stream-command-output: true`, the full deployment output (docker pull, compose down/up, etc.) is streamed as the HTTP response body and appears in the GitHub Actions step log.\n\n### Used in\n - [taonity/prodenv](https://github.com/taonity/prodenv)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaonity%2Fdocker-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaonity%2Fdocker-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaonity%2Fdocker-webhook/lists"}