mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Replacing Channels and Domains with Collection. Moving downloading relationships from Channel to Collection. Created domains.yaml config to manage tagged domain collections. Adding turn-key upgrade solution in the UI.
90 lines
1.4 KiB
Text
90 lines
1.4 KiB
Text
# Nginx config for the WROLPi services.
|
|
|
|
#
|
|
# Maintenance page for upgrades
|
|
#
|
|
|
|
location = /maintenance.html {
|
|
alias /var/www/maintenance.html;
|
|
}
|
|
|
|
#
|
|
# Error pages
|
|
#
|
|
|
|
location /error/ {
|
|
alias /var/www/;
|
|
internal;
|
|
}
|
|
|
|
#
|
|
# App
|
|
#
|
|
|
|
location /favicon.ico {
|
|
alias /opt/wrolpi/icon.ico;
|
|
}
|
|
|
|
location /apple-touch-icon.png {
|
|
alias /opt/wrolpi/icon.png;
|
|
}
|
|
|
|
location / {
|
|
# React APP
|
|
proxy_pass http://0.0.0.0:3000;
|
|
rewrite $1 break;
|
|
}
|
|
|
|
location /ws {
|
|
proxy_pass http://0.0.0.0:3000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
}
|
|
|
|
#
|
|
# API
|
|
#
|
|
|
|
location /api {
|
|
proxy_pass http://0.0.0.0:8081;
|
|
rewrite /^api(.*)$ $1 break;
|
|
}
|
|
|
|
location /docs {
|
|
proxy_pass http://0.0.0.0:8081;
|
|
rewrite /^docs(.*)$ $1 break;
|
|
}
|
|
|
|
location /media {
|
|
# The media files mounted in the docker volume
|
|
sendfile on;
|
|
sendfile_max_chunk 1m;
|
|
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
|
|
autoindex on;
|
|
autoindex_exact_size off;
|
|
alias /media/wrolpi;
|
|
}
|
|
|
|
location /download {
|
|
# Assume any request here is to download a file from the media directory.
|
|
if ( $request_filename ~ '^.*/(.+)$' ) {
|
|
# Always include the filename for downloads.
|
|
add_header Content-Disposition 'attachment; filename="$1"';
|
|
}
|
|
|
|
sendfile on;
|
|
sendfile_max_chunk 1m;
|
|
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
|
|
autoindex on;
|
|
autoindex_exact_size off;
|
|
alias /media/wrolpi;
|
|
}
|