mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
upgrade to 1.18.2
This commit is contained in:
parent
3329a31f40
commit
67e36df7f3
7 changed files with 30 additions and 65 deletions
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/0.18.1/download?job=build_front
|
SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/0.18.2/download?job=build_front
|
||||||
SOURCE_SUM=086215327779453f08e7121b009dcaf721d7c3c9d5fad735c8d3194eb6f58096
|
SOURCE_SUM=cec96c574c7de95a94380bde3ab5f26d61b78018821bc012f80ef62caf3b2448
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=zip
|
SOURCE_FORMAT=zip
|
||||||
SOURCE_IN_SUBDIR=false
|
SOURCE_IN_SUBDIR=false
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/archive/0.18.1/funkwhale-0.18.1.tar.bz2
|
SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/archive/0.18.2/funkwhale-0.18.2.tar.bz2
|
||||||
SOURCE_SUM=0383dcb673e82699079583c56a3cba2d43979b0c3ba64b1cc0b9eb7b882fedbe
|
SOURCE_SUM=a4ae89e7f92ed4d047849ce36db86690d9114ec48226225e7b6db35c1cc1f936
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.bz2
|
SOURCE_FORMAT=tar.bz2
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -138,7 +138,8 @@ LDAP_START_TLS=False
|
||||||
LDAP_ROOT_DN=ou=users,dc=yunohost,dc=org
|
LDAP_ROOT_DN=ou=users,dc=yunohost,dc=org
|
||||||
LDAP_USER_ATTR_MAP={"username":"uid"}
|
LDAP_USER_ATTR_MAP={"username":"uid"}
|
||||||
|
|
||||||
FUNKWHALE_FRONTEND_PATH=__FINALPATH__/front/dist
|
FUNKWHALE_FRONTEND_PATH=__FINALPATH__/code/front/dist
|
||||||
|
FUNKWHALE_SPA_HTML_ROOT=__FINALPATH__/code/front/dist/index.html
|
||||||
|
|
||||||
# Nginx related configuration
|
# Nginx related configuration
|
||||||
NGINX_MAX_BODY_SIZE=100M
|
NGINX_MAX_BODY_SIZE=100M
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
|
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
|
||||||
|
|
||||||
# this is needed if you have file import via upload enabled
|
# this is needed if you have file import via upload enabled
|
||||||
client_max_body_size 100M;
|
client_max_body_size 100M;
|
||||||
proxy_pass http://127.0.0.1:__PORT__/;
|
proxy_pass http://127.0.0.1:__PORT__/;
|
||||||
|
@ -8,6 +8,9 @@ location / {
|
||||||
|
|
||||||
location /front/ {
|
location /front/ {
|
||||||
alias __FINALPATH__/code/front/dist/;
|
alias __FINALPATH__/code/front/dist/;
|
||||||
|
expires 30d;
|
||||||
|
add_header Pragma public;
|
||||||
|
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
|
||||||
}
|
}
|
||||||
|
|
||||||
location /federation/ {
|
location /federation/ {
|
||||||
|
@ -15,6 +18,13 @@ location /federation/ {
|
||||||
proxy_pass http://127.0.0.1:__PORT__/federation/;
|
proxy_pass http://127.0.0.1:__PORT__/federation/;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
location /rest/ {
|
||||||
|
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
|
||||||
|
proxy_pass http://127.0.0.1:__PORT__/api/subsonic/rest/;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
location /.well-known/ {
|
location /.well-known/ {
|
||||||
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
|
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
|
||||||
proxy_pass http://127.0.0.1:__PORT__/.well-known/;
|
proxy_pass http://127.0.0.1:__PORT__/.well-known/;
|
||||||
|
@ -24,7 +34,7 @@ location /media/ {
|
||||||
alias __FINALPATH__/media/;
|
alias __FINALPATH__/media/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location __PATH__/_protected/media/ {
|
location /_protected/media/ {
|
||||||
# this is an internal location that is used to serve
|
# this is an internal location that is used to serve
|
||||||
# audio files once correct permission / authentication
|
# audio files once correct permission / authentication
|
||||||
# has been checked on API side
|
# has been checked on API side
|
||||||
|
@ -32,56 +42,12 @@ location __PATH__/_protected/media/ {
|
||||||
alias __FINALPATH__/media/;
|
alias __FINALPATH__/media/;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Transcoding logic and caching
|
location /_protected/music/ {
|
||||||
# TODO: try to enable this
|
|
||||||
# https://code.eliotberriot.com/funkwhale/funkwhale/blob/0.8/deploy/nginx.conf#L4
|
|
||||||
# https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache
|
|
||||||
|
|
||||||
location = /transcode-auth {
|
|
||||||
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
|
|
||||||
# needed so we can authenticate transcode requests, but still
|
|
||||||
# cache the result
|
|
||||||
internal;
|
internal;
|
||||||
set $query '';
|
alias __FINALPATH__/import/;
|
||||||
# ensure we actually pass the jwt to the underlytin auth url
|
|
||||||
if ($request_uri ~* "[^\?]+\?(.*)$") {
|
|
||||||
set $query $1;
|
|
||||||
}
|
|
||||||
proxy_pass http://127.0.0.1:__PORT__/api/v1/trackfiles/viewable/?$query;
|
|
||||||
proxy_pass_request_body off;
|
|
||||||
proxy_set_header Content-Length "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location /api/v1/trackfiles/transcode/ {
|
|
||||||
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
|
|
||||||
# this block deals with authenticating and caching transcoding
|
|
||||||
# requests. Caching is heavily recommended as transcoding
|
|
||||||
# is a CPU intensive process.
|
|
||||||
auth_request /transcode-auth;
|
|
||||||
if ($args ~ (.*)jwt=[^&]*(.*)) {
|
|
||||||
set $cleaned_args $1$2;
|
|
||||||
}
|
|
||||||
proxy_cache_key "$scheme$request_method$host$uri$is_args$cleaned_args";
|
|
||||||
proxy_cache __NAME__-transcode;
|
|
||||||
proxy_cache_valid 200 7d;
|
|
||||||
proxy_ignore_headers "Set-Cookie";
|
|
||||||
proxy_hide_header "Set-Cookie";
|
|
||||||
add_header X-Cache-Status $upstream_cache_status;
|
|
||||||
proxy_pass http://127.0.0.1:__PORT__;
|
|
||||||
}
|
|
||||||
# end of transcoding logic
|
|
||||||
|
|
||||||
location /staticfiles/ {
|
location /staticfiles/ {
|
||||||
# django static files
|
# django static files
|
||||||
alias __FINALPATH__/code/data/static/;
|
alias __FINALPATH__/code/data/static/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /rest/ {
|
|
||||||
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
|
|
||||||
proxy_pass http://127.0.0.1:__PORT__/api/subsonic/rest/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /_protected/music {
|
|
||||||
internal;
|
|
||||||
alias __FINALPATH__/import;
|
|
||||||
}
|
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
"id": "funkwhale",
|
"id": "funkwhale",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 3.2.0"
|
"yunohost": ">= 3.3.0"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"en": "A modern, convivial and free music server"
|
"en": "A modern, convivial and free music server"
|
||||||
},
|
},
|
||||||
"version": "0.18.1~ynh1",
|
"version": "0.18.2~ynh1",
|
||||||
"url": "https://funkwhale.audio",
|
"url": "https://funkwhale.audio",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -113,8 +113,6 @@ ynh_setup_source "$final_path/code" "app-frontend"
|
||||||
# add proxy_cache and connection_upgrade at the beginning of the domain configuration
|
# add proxy_cache and connection_upgrade at the beginning of the domain configuration
|
||||||
echo "
|
echo "
|
||||||
|
|
||||||
proxy_cache_path /tmp/$app-transcode levels=1:2 keys_zone=$app-transcode:10m max_size=1g inactive=7d;
|
|
||||||
|
|
||||||
# required for websocket support
|
# required for websocket support
|
||||||
map \$http_upgrade \$connection_upgrade {
|
map \$http_upgrade \$connection_upgrade {
|
||||||
default upgrade;
|
default upgrade;
|
||||||
|
|
|
@ -95,7 +95,7 @@ ynh_secure_remove "/var/log/$app"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# remove domain specific configuration
|
# remove domain specific configuration
|
||||||
tail -n +11 "/etc/nginx/conf.d/$domain.conf" > "/etc/nginx/conf.d/$domain.conf.temp"
|
tail -n +9 "/etc/nginx/conf.d/$domain.conf" > "/etc/nginx/conf.d/$domain.conf.temp"
|
||||||
mv "/etc/nginx/conf.d/$domain.conf.temp" "/etc/nginx/conf.d/$domain.conf"
|
mv "/etc/nginx/conf.d/$domain.conf.temp" "/etc/nginx/conf.d/$domain.conf"
|
||||||
|
|
||||||
# Remove the dedicated nginx config
|
# Remove the dedicated nginx config
|
||||||
|
|
Loading…
Reference in a new issue