1
0
Fork 0
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:
Jean-Baptiste Holcroft 2019-02-15 06:46:40 +01:00
parent 3329a31f40
commit 67e36df7f3
7 changed files with 30 additions and 65 deletions

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/0.18.1/download?job=build_front
SOURCE_SUM=086215327779453f08e7121b009dcaf721d7c3c9d5fad735c8d3194eb6f58096
SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/0.18.2/download?job=build_front
SOURCE_SUM=cec96c574c7de95a94380bde3ab5f26d61b78018821bc012f80ef62caf3b2448
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=false

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/archive/0.18.1/funkwhale-0.18.1.tar.bz2
SOURCE_SUM=0383dcb673e82699079583c56a3cba2d43979b0c3ba64b1cc0b9eb7b882fedbe
SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/archive/0.18.2/funkwhale-0.18.2.tar.bz2
SOURCE_SUM=a4ae89e7f92ed4d047849ce36db86690d9114ec48226225e7b6db35c1cc1f936
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.bz2
SOURCE_IN_SUBDIR=true

View file

@ -138,7 +138,8 @@ LDAP_START_TLS=False
LDAP_ROOT_DN=ou=users,dc=yunohost,dc=org
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_MAX_BODY_SIZE=100M

View file

@ -1,13 +1,16 @@
location / {
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
# this is needed if you have file import via upload enabled
client_max_body_size 100M;
proxy_pass http://127.0.0.1:__PORT__/;
location / {
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
# this is needed if you have file import via upload enabled
client_max_body_size 100M;
proxy_pass http://127.0.0.1:__PORT__/;
}
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/ {
@ -15,6 +18,13 @@ location /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/ {
include __FINALPATH__/code/deploy/funkwhale_proxy.conf;
proxy_pass http://127.0.0.1:__PORT__/.well-known/;
@ -24,7 +34,7 @@ location /media/ {
alias __FINALPATH__/media/;
}
location __PATH__/_protected/media/ {
location /_protected/media/ {
# this is an internal location that is used to serve
# audio files once correct permission / authentication
# has been checked on API side
@ -32,56 +42,12 @@ location __PATH__/_protected/media/ {
alias __FINALPATH__/media/;
}
# Transcoding logic and caching
# 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
location /_protected/music/ {
internal;
set $query '';
# 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 "";
alias __FINALPATH__/import/;
}
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/ {
# django static files
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;
}
}

View file

@ -3,12 +3,12 @@
"id": "funkwhale",
"packaging_format": 1,
"requirements": {
"yunohost": ">= 3.2.0"
"yunohost": ">= 3.3.0"
},
"description": {
"en": "A modern, convivial and free music server"
},
"version": "0.18.1~ynh1",
"version": "0.18.2~ynh1",
"url": "https://funkwhale.audio",
"license": "BSD-3-Clause",
"maintainer": {
@ -47,4 +47,4 @@
}
]
}
}
}

View file

@ -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
echo "
proxy_cache_path /tmp/$app-transcode levels=1:2 keys_zone=$app-transcode:10m max_size=1g inactive=7d;
# required for websocket support
map \$http_upgrade \$connection_upgrade {
default upgrade;

View file

@ -95,7 +95,7 @@ ynh_secure_remove "/var/log/$app"
#=================================================
# 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"
# Remove the dedicated nginx config