音楽で楽しみましょう!-Let's have fun with music!-

Signed-off-by: Shin'ya Minazuki <shinyoukai@laidback.moe>
This commit is contained in:
Shin'ya Minazuki 2026-01-24 16:16:49 -03:00
commit 54c6d22102
517 changed files with 637 additions and 639 deletions

View file

@ -1,7 +1,7 @@
upstream funkwhale-api {
upstream funquail-api {
# depending on your setup, you may want to update this
server ${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT};
server ${FUNQUAIL_API_IP}:${FUNQUAIL_API_PORT};
}
# Required for websocket support.
@ -14,7 +14,7 @@ server {
listen 80;
listen [::]:80;
# update this to match your instance name
server_name ${FUNKWHALE_HOSTNAME};
server_name ${FUNQUAIL_HOSTNAME};
# useful for Let's Encrypt
location /.well-known/acme-challenge/ {
@ -30,27 +30,27 @@ server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name ${FUNKWHALE_HOSTNAME};
server_name ${FUNQUAIL_HOSTNAME};
# TLS
# Feel free to use your own configuration for SSL here or simply remove the
# lines and move the configuration to the previous server block if you
# don't want to run funkwhale behind https (this is not recommended)
# don't want to run funquail behind https (this is not recommended)
# have a look here for let's encrypt configuration:
# https://certbot.eff.org/all-instructions/#debian-9-stretch-nginx
ssl_protocols TLSv1.2;
ssl_ciphers HIGH:!MEDIUM:!LOW:!aNULL:!NULL:!SHA;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_certificate /etc/letsencrypt/live/${FUNKWHALE_HOSTNAME}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${FUNKWHALE_HOSTNAME}/privkey.pem;
ssl_certificate /etc/letsencrypt/live/${FUNQUAIL_HOSTNAME}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${FUNQUAIL_HOSTNAME}/privkey.pem;
# HSTS
add_header Strict-Transport-Security "max-age=31536000";
# General configs
root ${FUNKWHALE_FRONTEND_PATH};
root ${FUNQUAIL_FRONTEND_PATH};
client_max_body_size ${NGINX_MAX_BODY_SIZE};
charset utf-8;
@ -87,42 +87,42 @@ server {
add_header Service-Worker-Allowed "/";
location /api/ {
include /etc/nginx/funkwhale_proxy.conf;
include /etc/nginx/funquail_proxy.conf;
# This is needed if you have file import via upload enabled.
client_max_body_size ${NGINX_MAX_BODY_SIZE};
proxy_pass http://funkwhale-api;
proxy_pass http://funquail-api;
}
location ~ ^/library/(albums|tracks|artists|playlists)/ {
include /etc/nginx/funkwhale_proxy.conf;
proxy_pass http://funkwhale-api;
include /etc/nginx/funquail_proxy.conf;
proxy_pass http://funquail-api;
}
location /channels/ {
include /etc/nginx/funkwhale_proxy.conf;
proxy_pass http://funkwhale-api;
include /etc/nginx/funquail_proxy.conf;
proxy_pass http://funquail-api;
}
location ~ ^/@(vite-plugin-pwa|vite|id)/ {
include /etc/nginx/funkwhale_proxy.conf;
alias ${FUNKWHALE_FRONTEND_PATH}/;
include /etc/nginx/funquail_proxy.conf;
alias ${FUNQUAIL_FRONTEND_PATH}/;
try_files $uri $uri/ /index.html;
}
location /@ {
include /etc/nginx/funkwhale_proxy.conf;
proxy_pass http://funkwhale-api;
include /etc/nginx/funquail_proxy.conf;
proxy_pass http://funquail-api;
}
location / {
expires 1d;
include /etc/nginx/funkwhale_proxy.conf;
alias ${FUNKWHALE_FRONTEND_PATH}/;
include /etc/nginx/funquail_proxy.conf;
alias ${FUNQUAIL_FRONTEND_PATH}/;
try_files $uri $uri/ /index.html;
}
location ~ "/(front/)?embed.html" {
alias ${FUNKWHALE_FRONTEND_PATH}/embed.html;
alias ${FUNQUAIL_FRONTEND_PATH}/embed.html;
add_header Content-Security-Policy "connect-src https: http: 'self'; default-src 'self'; script-src 'self' unpkg.com 'unsafe-inline' 'unsafe-eval'; style-src https: http: 'self' 'unsafe-inline'; img-src https: http: 'self' data:; font-src https: http: 'self' data:; object-src 'none'; media-src https: http: 'self' data:";
add_header Referrer-Policy "strict-origin-when-cross-origin";
@ -130,19 +130,19 @@ server {
}
location /federation/ {
include /etc/nginx/funkwhale_proxy.conf;
proxy_pass http://funkwhale-api;
include /etc/nginx/funquail_proxy.conf;
proxy_pass http://funquail-api;
}
# You can comment this if you do not plan to use the Subsonic API.
location /rest/ {
include /etc/nginx/funkwhale_proxy.conf;
proxy_pass http://funkwhale-api/api/subsonic/rest/;
include /etc/nginx/funquail_proxy.conf;
proxy_pass http://funquail-api/api/subsonic/rest/;
}
location /.well-known/ {
include /etc/nginx/funkwhale_proxy.conf;
proxy_pass http://funkwhale-api;
include /etc/nginx/funquail_proxy.conf;
proxy_pass http://funquail-api;
}
# Allow direct access to only specific subdirectories in /media
@ -189,7 +189,7 @@ server {
location /manifest.json {
# If the reverse proxy is terminating SSL, nginx gets confused and redirects to http, hence the full URL
return 302 ${FUNKWHALE_PROTOCOL}://${FUNKWHALE_HOSTNAME}/api/v1/instance/spa-manifest.json;
return 302 ${FUNQUAIL_PROTOCOL}://${FUNQUAIL_HOSTNAME}/api/v1/instance/spa-manifest.json;
}
location /staticfiles/ {