1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/audiobookshelf_ynh.git synced 2024-09-03 18:06:19 +02:00

rewrote config

This commit is contained in:
navanchauhan 2022-04-16 01:08:03 -06:00
parent 42e7fbe293
commit e8827dcf71
3 changed files with 22 additions and 26 deletions

View file

@ -1,7 +1,7 @@
SOURCE_URL=url of app's source SOURCE_URL=https://github.com/advplyr/audiobookshelf/archive/refs/tags/v1.7.2.tar.gz
SOURCE_SUM=sha256 checksum SOURCE_SUM=47aa5aaa2ee7818fb5ff842447bbfa52500a90a971af319576ad51239543f6bb
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true
SOURCE_FILENAME= #SOURCE_FILENAME=
SOURCE_EXTRACT=true SOURCE_EXTRACT=true

View file

@ -1,28 +1,22 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ { location __PATH__/ {
# Path to source proxy_pass http://127.0.0.1:__PORT__;
alias __FINALPATH__/ ; proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_pass_request_headers on;
### Example PHP configuration (remove it if not used) #WebSocket Support
index index.php; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file proxy_set_header Connection $http_connection;
#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 SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc; include conf.d/yunohost_panel.conf.inc;
} }

View file

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Small description of the service Description=Audiobokshelf
After=network.target After=network.target
[Service] [Service]
@ -7,9 +7,11 @@ Type=simple
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__/ WorkingDirectory=__FINALPATH__/
ExecStart=__FINALPATH__/script ExecStart=__YNH_NPM__ run dev
StandardOutput=append:/var/log/__APP__/__APP__.log StandardOutput=append:/var/log/__APP__/__APP__.log
StandardError=inherit StandardError=inherit
Restart=on-failure
RestartSec=5s
# Sandboxing options to harden security # Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these # Depending on specificities of your service/app, you may need to tweak these