Update references for Docker
Signed-off-by: Shin'ya Minazuki <shinyoukai@laidback.moe>
This commit is contained in:
parent
5e5d23ec76
commit
be22f2f2e8
4 changed files with 79 additions and 79 deletions
|
|
@ -1,10 +1,10 @@
|
|||
upstream funkwhale-api {
|
||||
upstream funquail-api {
|
||||
# depending on your setup, you may want to update this
|
||||
server ${FUNKWHALE_API_HOST}:${FUNKWHALE_API_PORT};
|
||||
server ${FUNQUAIL_API_HOST}:${FUNQUAIL_API_PORT};
|
||||
}
|
||||
|
||||
upstream funkwhale-front {
|
||||
server ${FUNKWHALE_FRONT_IP}:${FUNKWHALE_FRONT_PORT};
|
||||
upstream funquail-front {
|
||||
server ${FUNQUAIL_FRONT_IP}:${FUNQUAIL_FRONT_PORT};
|
||||
}
|
||||
|
||||
# Required for websocket support.
|
||||
|
|
@ -58,40 +58,40 @@ 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;
|
||||
proxy_pass http://funkwhale-front;
|
||||
include /etc/nginx/funquail_proxy.conf;
|
||||
proxy_pass http://funquail-front;
|
||||
}
|
||||
|
||||
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;
|
||||
proxy_pass http://funkwhale-front;
|
||||
include /etc/nginx/funquail_proxy.conf;
|
||||
proxy_pass http://funquail-front;
|
||||
}
|
||||
|
||||
location = /embed.html {
|
||||
proxy_pass http://funkwhale-front;
|
||||
proxy_pass http://funquail-front;
|
||||
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";
|
||||
|
||||
|
|
@ -99,19 +99,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
|
||||
|
|
@ -158,7 +158,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/ {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
upstream funkwhale-api {
|
||||
upstream funquail-api {
|
||||
# depending on your setup, you may want to update this
|
||||
server ${FUNKWHALE_API_HOST}:${FUNKWHALE_API_PORT};
|
||||
server ${FUNQUAIL_API_HOST}:${FUNQUAIL_API_PORT};
|
||||
}
|
||||
|
||||
# Required for websocket support.
|
||||
|
|
@ -54,36 +54,36 @@ 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;
|
||||
include /etc/nginx/funquail_proxy.conf;
|
||||
alias /usr/share/nginx/html/;
|
||||
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;
|
||||
include /etc/nginx/funquail_proxy.conf;
|
||||
alias /usr/share/nginx/html/;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
|
@ -97,19 +97,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
|
||||
|
|
@ -156,7 +156,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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,25 +1,25 @@
|
|||
{% if config.reverse_proxy %}
|
||||
upstream fw {
|
||||
server ${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT};
|
||||
server ${FUNQUAIL_API_IP}:${FUNQUAIL_API_PORT};
|
||||
}
|
||||
{% else %}
|
||||
{% if config.inside_docker %}
|
||||
upstream funkwhale-api {
|
||||
upstream funquail-api {
|
||||
# depending on your setup, you may want to update this
|
||||
server ${FUNKWHALE_API_HOST}:${FUNKWHALE_API_PORT};
|
||||
server ${FUNQUAIL_API_HOST}:${FUNQUAIL_API_PORT};
|
||||
}
|
||||
{% else %}
|
||||
|
||||
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};
|
||||
}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if config.proxy_frontend %}
|
||||
|
||||
upstream funkwhale-front {
|
||||
server ${FUNKWHALE_FRONT_IP}:${FUNKWHALE_FRONT_PORT};
|
||||
upstream funquail-front {
|
||||
server ${FUNQUAIL_FRONT_IP}:${FUNQUAIL_FRONT_PORT};
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
|
|
@ -34,7 +34,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/ {
|
||||
|
|
@ -52,20 +52,20 @@ 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";
|
||||
|
|
@ -82,7 +82,7 @@ server {
|
|||
{% if config.inside_docker %}
|
||||
root /usr/share/nginx/html;
|
||||
{% else %}
|
||||
root ${FUNKWHALE_FRONTEND_PATH};
|
||||
root ${FUNQUAIL_FRONTEND_PATH};
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
client_max_body_size ${NGINX_MAX_BODY_SIZE};
|
||||
|
|
@ -122,39 +122,39 @@ 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;
|
||||
include /etc/nginx/funquail_proxy.conf;
|
||||
{% if config.proxy_frontend %}
|
||||
proxy_pass http://funkwhale-front;
|
||||
proxy_pass http://funquail-front;
|
||||
{% else %}
|
||||
{% if config.inside_docker %}
|
||||
alias /usr/share/nginx/html/;
|
||||
{% else %}
|
||||
alias ${FUNKWHALE_FRONTEND_PATH}/;
|
||||
alias ${FUNQUAIL_FRONTEND_PATH}/;
|
||||
{% endif %}
|
||||
try_files $uri $uri/ /index.html;
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
location /@ {
|
||||
include /etc/nginx/funkwhale_proxy.conf;
|
||||
proxy_pass http://funkwhale-api;
|
||||
include /etc/nginx/funquail_proxy.conf;
|
||||
proxy_pass http://funquail-api;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
|
|
@ -162,16 +162,16 @@ server {
|
|||
{% if not config.reverse_proxy %}
|
||||
expires 1d;
|
||||
{% endif %}
|
||||
include /etc/nginx/funkwhale_proxy.conf;
|
||||
include /etc/nginx/funquail_proxy.conf;
|
||||
{% if config.proxy_frontend and not config.reverse_proxy %}
|
||||
proxy_pass http://funkwhale-front;
|
||||
proxy_pass http://funquail-front;
|
||||
{% elif not config.proxy_frontend and config.reverse_proxy %}
|
||||
proxy_pass http://fw;
|
||||
{% else %}
|
||||
{% if config.inside_docker %}
|
||||
alias /usr/share/nginx/html/;
|
||||
{% else %}
|
||||
alias ${FUNKWHALE_FRONTEND_PATH}/;
|
||||
alias ${FUNQUAIL_FRONTEND_PATH}/;
|
||||
{% endif %}
|
||||
try_files $uri $uri/ /index.html;
|
||||
{% endif %}
|
||||
|
|
@ -180,13 +180,13 @@ server {
|
|||
{% if not config.reverse_proxy %}
|
||||
{% if config.proxy_frontend %}
|
||||
location = /embed.html {
|
||||
proxy_pass http://funkwhale-front;
|
||||
proxy_pass http://funquail-front;
|
||||
{% else %}
|
||||
location ~ "/(front/)?embed.html" {
|
||||
{% if config.inside_docker %}
|
||||
alias /usr/share/nginx/html/embed.html;
|
||||
{% else %}
|
||||
alias ${FUNKWHALE_FRONTEND_PATH}/embed.html;
|
||||
alias ${FUNQUAIL_FRONTEND_PATH}/embed.html;
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
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:";
|
||||
|
|
@ -196,19 +196,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
|
||||
|
|
@ -255,7 +255,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;
|
||||
}
|
||||
|
||||
{% if config.proxy_frontend %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue