mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
use webhook tool
This commit is contained in:
parent
125857dd1b
commit
df8c6ef8f7
@ -105,4 +105,43 @@ git config pull.ff only
|
||||
# Allow nginx configuration and restart for gradido
|
||||
sudo nano /etc/sudoers.d/gradido
|
||||
> gradido ALL=(ALL) NOPASSWD: /etc/init.d/nginx start,/etc/init.d/nginx stop,/etc/init.d/nginx restart
|
||||
sudo chmod a+rw /etc/nginx/sites-enabled
|
||||
sudo chmod a+rw /etc/nginx/sites-enabled
|
||||
|
||||
# Webhooks (optional)
|
||||
sudo apt install webhook
|
||||
nano ~/hooks.json
|
||||
```
|
||||
[
|
||||
{
|
||||
"id": "gradido",
|
||||
"execute-command": "/home/gradido/gradido/deployment/bare_metal/start.sh",
|
||||
"command-working-directory": "/home/gradido/gradido/deployment/bare_metal",
|
||||
"trigger-rule": {
|
||||
"and": [
|
||||
{
|
||||
"match": {
|
||||
"type": "payload-hash-sha1",
|
||||
"secret": "secret",
|
||||
"parameter": {
|
||||
"source": "header",
|
||||
"name": "X-Hub-Signature"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
"type": "value",
|
||||
"value": "refs/heads/new_deployment",
|
||||
"parameter": {
|
||||
"source": "payload",
|
||||
"name": "ref"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
webhook -hooks ~/hooks.json &
|
||||
@ -70,6 +70,11 @@ server {
|
||||
proxy_redirect off;
|
||||
}
|
||||
|
||||
# Webhook reverse proxy
|
||||
location /hooks/ {
|
||||
proxy_pass http://127.0.0.1:9000/hooks/;
|
||||
}
|
||||
|
||||
# Admin Frontend
|
||||
location /admin {
|
||||
proxy_http_version 1.1;
|
||||
|
||||
@ -56,6 +56,11 @@ server {
|
||||
proxy_redirect off;
|
||||
}
|
||||
|
||||
# Webhook reverse proxy
|
||||
location /hooks/ {
|
||||
proxy_pass http://127.0.0.1:9000/hooks/;
|
||||
}
|
||||
|
||||
# Admin Frontend
|
||||
location /admin {
|
||||
proxy_http_version 1.1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user