1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flood_ynh.git synced 2024-09-03 18:36:20 +02:00

Add path url in config

This commit is contained in:
Taker 2021-01-31 17:51:52 +01:00
parent 1a160de4c7
commit 49522d0447
4 changed files with 17 additions and 12 deletions

View file

@ -1,8 +1,8 @@
location / {
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_pass http://localhost:3000/;
proxy_set_header Host $host;
proxy_buffering off;
location PATH/api {
proxy_pass http://127.0.0.1:3000;
}
location PATH {
alias /usr/lib/node_modules/flood/dist/assets/;
try_files $uri PATH/index.html;
}

View file

@ -62,6 +62,7 @@ sudo npm i -g flood
# Launch flood on boot
cd $current_dir
ynh_replace_string "PATH" "$path_url" ../sources/flood.service
sudo cp ../sources/flood.service /etc/systemd/system/flood.service
systemctl daemon-reload
systemctl enable flood.service
@ -80,6 +81,7 @@ sudo yunohost service add rtorrent
sudo yunohost service add flood
# nginx config
ynh_replace_string "PATH" "$path_url" ../conf/nginx.conf
ynh_add_nginx_config
# Start rtorrent and flood

View file

@ -4,7 +4,7 @@ After=network.target
[Service]
WorkingDirectory=/var/www/flood
ExecStart=/usr/bin/npm start --production /var/www/flood
ExecStart=/usr/bin/npm start --production /var/www/flood --baseuri=PATH
User=flood
[Install]

View file

@ -1,11 +1,14 @@
[Unit]
Description=Flood Web UI
Description=rTorrent
After=network.target
[Service]
WorkingDirectory=~
ExecStart=/usr/bin/flood
User=flood
Type=forking
KillMode=none
ExecStart=/usr/bin/screen -d -m -fa -S rtorrent /usr/local/bin/rtorrent
ExecStop=/usr/bin/killall -w -s 2 /usr/local/bin/rtorrent
WorkingDirectory=%h
[Install]
WantedBy=multi-user.target
WantedBy=default.target