Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/psi-4ward/docker-webhooks
Predefined `docker exec` using HTTP-POST for Gitlab/Github Webhooks
https://github.com/psi-4ward/docker-webhooks
Last synced: 3 months ago
JSON representation
Predefined `docker exec` using HTTP-POST for Gitlab/Github Webhooks
- Host: GitHub
- URL: https://github.com/psi-4ward/docker-webhooks
- Owner: psi-4ward
- Created: 2015-05-04T14:47:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-04T16:03:25.000Z (over 9 years ago)
- Last Synced: 2024-09-28T09:04:10.882Z (3 months ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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)