# docker-webhooks

> Run docker exec triggered throug git webhooks

Latest version **0.0.4** (published 2015-05-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install docker-webhooks
pnpm add docker-webhooks
yarn add docker-webhooks
bun add docker-webhooks
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2015-05-04 |
| First published | 2015-05-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Christoph Wiechert |
| Maintainers | psi |
| Keywords | docker, github, gitlab, webhook, update |

## Links

- npm: https://www.npmjs.com/package/docker-webhooks
- Repository: https://github.com/psi-4ward/docker-webhooks
- Issues: https://github.com/psi-4ward/docker-webhooks/issues
- npm.io page: https://npm.io/package/docker-webhooks

## Dependencies (4)

- [async](https://npm.io/package/async.md) ^0.9.0
- [lodash](https://npm.io/package/lodash.md) ^3.8.0
- [js-yaml](https://npm.io/package/js-yaml.md) ^3.3.0
- [dockerode](https://npm.io/package/dockerode.md) ^2.1.2

## Recent versions

- 0.0.4 (latest) — 2015-05-04
- 0.0.3 — 2015-05-04
- 0.0.2 — 2015-05-04
- 0.0.1 — 2015-05-04

## README

# docker-webhooks
Predefined `docker exec` using HTTP-POST for Gitlab/Github Webhooks

## Install

* Make sure the app can read/write to `DOCKER_HOST` (default: `/var/run/docker.sock`)

```shell
npm install docker-webhooks
cd docker-webhooks
sudo node app.js
```

## Configuration

Create YAML files in `/tokens`

```yaml
# Container Name or ID
container: mywebapp

# Secret token
token: ahMo3zoh0ahmei5xeCo9jebae2gooz

# Tasks to execute
tasks:
  # Name to identify this task
  - name: Update Frontend
    # Print stdout from docker exec
    showStdout: true

    # Some conditions checked against the HTTP-Body JSON
    conditions:
      - ref: "refs/heads/master"

    # Commands to execute, use docker CMD syntax
    exec:
      - ["/bin/git", "pull"]
      - ["/bin/npm", "install"]
      - gulp

  - name: Another Task
    exec:
      - ["echo", "i am another task without conditions"]
```


## Authors
* Christoph Wiechert



## License
  [MIT](LICENSE)

---
_Source: https://npm.io/package/docker-webhooks · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
