Improve the documentation

Improve the wording to make it more clear, that weblug can run rootless.
Also adjust the yaml layout.
This commit is contained in:
Felix Niederwanger 2023-04-22 10:58:40 +02:00
parent 5715b9c399
commit bb075137cb
Signed by: phoenix
GPG key ID: 6E77A590E3F6D71C
2 changed files with 11 additions and 11 deletions

View file

@ -14,7 +14,7 @@ To use `weblug` you need to define webooks in a yaml file. See [weblug.yml](webl
This starts the webserver and listens for incoming webhooks.
Note: for custom `uid`/`gid` webhooks, the program needs to run as root.
`weblug` can run as any user, however for custom `uid`/`gid` webhooks, the program needs to run as root.
## Build

View file

@ -3,27 +3,27 @@
settings:
#bind: "127.0.0.1:2088" # bind address for webserver
bind: ":2088" # bind to all addresses
bind: ":2088" # bind to all addresses
# hook definition. A hook needs to define the HTTP endpoint ("route") and the
# command that will be executed, once this route is executed
# hook definitions. A hook needs to define the HTTP endpoint ("route") and the command
# See the following examples for more possible options.
hooks:
- name: 'hook one'
route: "/webhooks/1"
command: "sleep 5"
background: True # Terminate http request immediately
concurrency: 2 # At most 2 parallel processes are allowed
background: True # Terminate http request immediately
concurrency: 2 # At most 2 parallel processes are allowed
- name: 'hook two'
route: "/webhooks/2"
command: "bash -c 'sleep 5'"
concurrency: 5 # At most 5 parallel processes are allowed
concurrency: 5 # At most 5 parallel processes are allowed
- name: 'hook 3'
route: "/webhooks/data/3"
command: "bash -c 'echo $UID $GID'"
uid: 100 # Run command as system user id (uid) 100
gid: 200 # Run command with system group id (gid) 200
concurrency: 1 # No concurrency. Returns 500 on parallel requests
output: True # Print program output to console
uid: 100 # Run command as system user id (uid) 100
gid: 200 # Run command with system group id (gid) 200
concurrency: 1 # No concurrency. Returns 500 on parallel requests
output: True # Print program output to console
- name: 'hook 4'
route: "/webhooks/restricted/4"
command: "true"