mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
Merge pull request #1 from YunoHost-Apps/testing
Enable multi-instance and set requirements >=3.0
This commit is contained in:
commit
8b56872e18
6 changed files with 24 additions and 6 deletions
|
@ -18,7 +18,7 @@
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=0
|
multi_instance=1
|
||||||
incorrect_path=0
|
incorrect_path=0
|
||||||
port_already_use=0
|
port_already_use=0
|
||||||
change_url=0
|
change_url=0
|
||||||
|
|
|
@ -66,7 +66,7 @@ location /api/v1/trackfiles/transcode/ {
|
||||||
set $cleaned_args $1$2;
|
set $cleaned_args $1$2;
|
||||||
}
|
}
|
||||||
proxy_cache_key "$scheme$request_method$host$uri$is_args$cleaned_args";
|
proxy_cache_key "$scheme$request_method$host$uri$is_args$cleaned_args";
|
||||||
proxy_cache transcode;
|
proxy_cache __NAME__-transcode;
|
||||||
proxy_cache_valid 200 7d;
|
proxy_cache_valid 200 7d;
|
||||||
proxy_ignore_headers "Set-Cookie";
|
proxy_ignore_headers "Set-Cookie";
|
||||||
proxy_hide_header "Set-Cookie";
|
proxy_hide_header "Set-Cookie";
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"id": "funkwhale",
|
"id": "funkwhale",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 2.7.12"
|
"yunohost": ">= 3.0.0~beta1.2"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"en": "A translation platform using Git and Python"
|
"en": "A translation platform using Git and Python"
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
"name": "Jean-Baptiste Holcroft",
|
"name": "Jean-Baptiste Holcroft",
|
||||||
"email": "jean-baptiste@holcroft.fr"
|
"email": "jean-baptiste@holcroft.fr"
|
||||||
},
|
},
|
||||||
"multi_instance": false,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
"nginx"
|
"nginx"
|
||||||
],
|
],
|
||||||
|
|
|
@ -114,7 +114,7 @@ ynh_setup_source "$final_path" "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=transcode:10m max_size=1g inactive=7d;
|
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 {
|
||||||
|
|
|
@ -74,6 +74,9 @@ mv "/etc/nginx/conf.d/$domain.conf.temp" "/etc/nginx/conf.d/$domain.conf"
|
||||||
# Remove the dedicated nginx config
|
# Remove the dedicated nginx config
|
||||||
ynh_remove_nginx_config
|
ynh_remove_nginx_config
|
||||||
|
|
||||||
|
# remove local nginx cache
|
||||||
|
ynh_secure_remove "/tmp/$app-transcode"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CLOSE A PORT
|
# CLOSE A PORT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -70,7 +70,22 @@ ynh_setup_source "$final_path" "app-frontend"
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# there is no need to change the global configuration yet
|
# change the global configuration
|
||||||
|
# remove domain specific configuration
|
||||||
|
tail -n +11 "/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"
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
'' close;
|
||||||
|
}
|
||||||
|
" | cat - "/etc/nginx/conf.d/$domain.conf" > temp && mv temp "/etc/nginx/conf.d/$domain.conf"
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
Loading…
Reference in a new issue