Simple webhook service to update and deploy sites and do other maintenance
Project description
webhaak is a simple webhook service to update and deploy sites and do other maintenance without having to ssh to a node.
Installation
From PyPI
Assuming you already are inside a virtualenv:
pip install webhaak
From Git
Create a new virtualenv (if you are not already in one) and install the necessary packages:
git clone https://github.com/aquatix/webhaak.git
cd webhaak
mkvirtualenv webhaak # or whatever project you are working on
pip install -r requirements.txt
Usage
Copy settings.py from example_config to the parent directory and configure to your needs. Create a yaml file with the projects to serve (see next section) and refer to this file from the settings.py.
Run webhaak as a service under nginx or apache and call the appropriate url’s when wanted (e.g., on push to repository).
Url’s are of the form https://hook.example.com/app/<appkey>/<triggerkey>
Example configuration
See the example hook settings for syntax of how to configure repositories, commands and directories.
Call webhaak on its endpoint /getappkey to generate a random new key for usage in the projects yaml file (so, for example https://hook.example.com/getappkey)
By default, webhaak clones projects in a directory under its REPOS_CACHE_DIR directory, but there is support for a per-repo parent dir settings with repoparent.
This means that webhaak then doesn’t clone this repo into its default cache dir, but in a subdirectory of the directory configured in repoparent, so <repoparent>/reponame (e.g., /srv/customparent/myproject).
Server configuration
What’s new?
See the Changelog.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file webhaak-0.3.0.zip
.
File metadata
- Download URL: webhaak-0.3.0.zip
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6a6933cfc97e3269ad2dc6f4bd669f5454f0c7e7caa77dafa381f4a89c168d8 |
|
MD5 | a7c05c26540e502e0032c3d66770aa29 |
|
BLAKE2b-256 | e8b5110e3365cc38d5d4bb34c864af1642c678e380d727a9c8d4d4d3e8a32381 |