working app

This commit is contained in:
oiseauroch
2022-11-19 17:51:03 +01:00
parent 97dfa52fe6
commit 2dc4e5a8a4
13 changed files with 108 additions and 477 deletions

View File

@@ -1,5 +1,5 @@
SOURCE_URL=url of app's source
SOURCE_SUM=sha256 checksum
SOURCE_URL=https://github.com/de-vri-es/webhook-httpd/archive/refs/tags/v0.1.4.tar.gz
SOURCE_SUM=cbdd0b6bb697b06950b2055703a75bacd3799d850c75eec64a895014a127e317
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

18
conf/config.yml Normal file
View File

@@ -0,0 +1,18 @@
# By default, the server accepts connections on all addresses.
# You can limit this by setting `bind-address` to a specific IP address.
bind-address: "::"
# Choose a port number to listen on.
port: __PORT__
# The log level of the server.
# You can choose from: error, warn, info, debug and trace.
log-level: info
# The hooks.
hooks:
# A hook that prints the script environment, useful for debugging.
# Output is sent to the server log, not as HTTP response body.
- url: "/print-env"
commands:
- cmd: ["env"]

View File

@@ -1,28 +1,7 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
proxy_set_header Host $host;
proxy_buffering off;
# Path to source
alias __FINALPATH__/;
### Example PHP configuration (remove it if not used)
index index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
#client_max_body_size 50M;
try_files $uri $uri/ index.php;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
### End of PHP configuration part
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
proxy_pass http://localhost:__PORT__/;
}

View File

@@ -7,7 +7,7 @@ Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__FINALPATH__/
ExecStart=__FINALPATH__/script
ExecStart=__FINALPATH__/webhook-httpd --config config.yml
StandardOutput=append:/var/log/__APP__/__APP__.log
StandardError=inherit