mirror of
https://github.com/ncarlier/webhookd.git
synced 2025-04-30 18:23:19 +00:00
chore(): add installation script
This commit is contained in:
parent
e6b02069e7
commit
4b3c0c1bdb
24
README.md
24
README.md
@ -7,25 +7,21 @@ A very simple webhook server to launch shell scripts.
|
||||
|
||||
## Installation
|
||||
|
||||
### Using the binary
|
||||
Run the following command:
|
||||
|
||||
Linux binaries for release [1.0.0](https://github.com/ncarlier/webhookd/releases)
|
||||
|
||||
* [amd64](https://github.com/ncarlier/webhookd/releases/download/v1.0.0/webhookd-linux-amd64-v1.0.0.tar.gz)
|
||||
|
||||
Download the version you need, untar, and install to your PATH.
|
||||
|
||||
```
|
||||
$ wget https://github.com/ncarlier/webhookd/releases/download/v1.0.0/webhookd-linux-amd64-v1.0.0.tar.gz
|
||||
$ tar xvzf webhookd-linux-amd64-v1.0.0.tar.gz
|
||||
$ ./webhookd
|
||||
```bash
|
||||
$ go get -v github.com/ncarlier/webhookd/webhookd
|
||||
```
|
||||
|
||||
### Using Docker
|
||||
|
||||
Start the container mounting your scripts directory:
|
||||
**Or** download the binary regarding your architecture:
|
||||
|
||||
```bash
|
||||
$ sudo curl -s https://raw.githubusercontent.com/ncarlier/webhookd/master/install.sh | sh
|
||||
```
|
||||
|
||||
**Or** use Docker:
|
||||
|
||||
```bash
|
||||
$ docker run -d --name=webhookd \
|
||||
--env-file .env \
|
||||
-v ${PWD}/scripts:/var/opt/webhookd/scripts \
|
||||
|
8
install.sh
Normal file
8
install.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
release_url="https://api.github.com/repos/ncarlier/webhookd/releases/latest"
|
||||
download_url=`curl -s $release_url | grep browser_download_url | head -n 1 | cut -d '"' -f 4`
|
||||
|
||||
sudo curl -o /usr/local/bin/webhookd -L $download_url
|
||||
sudo chmod +x /usr/local/bin/webhookd
|
||||
|
Loading…
x
Reference in New Issue
Block a user