♻️ Integrate new storage subsystem.

This commit is contained in:
Andrey Antukh 2021-01-04 18:41:05 +01:00 committed by Alonso Torres
parent 3d88749976
commit ab944fb9ae
48 changed files with 950 additions and 632 deletions

View file

@ -40,8 +40,7 @@ http {
'' close;
}
include /etc/nginx/sites-enabled/*;
# include /etc/nginx/sites-enabled/*;
server {
listen 3449 default_server;
@ -59,25 +58,8 @@ http {
resolver 8.8.8.8;
etag off;
location / {
root /home/penpot/penpot/frontend/resources/public;
add_header Cache-Control "no-cache, max-age=0";
}
location /api {
proxy_pass http://127.0.0.1:6060/api;
}
location /storage {
proxy_pass http://127.0.0.1:6060/storage;
recursive_error_pages on;
proxy_intercept_errors on;
error_page 301 302 307 = @handle_redirect;
}
location @handle_redirect {
set $redirect_uri "$upstream_http_location";
set $redirect_host "$upstream_http_x_host";
@ -85,15 +67,34 @@ http {
proxy_buffering off;
add_header x-internal-redirect "$redirect_uri";
add_header cache-control "$redirect_cache_control";
proxy_set_header Host "$redirect_host";
proxy_hide_header etag;
proxy_hide_header x-amz-id-2;
proxy_hide_header x-amz-request-id;
proxy_hide_header x-amz-meta-server-side-encryption;
proxy_hide_header x-amz-server-side-encryption;
proxy_pass $redirect_uri;
add_header x-internal-redirect "$redirect_uri";
add_header x-cache-control "$redirect_cache_control";
add_header cache-control "$redirect_cache_control";
}
location /assets {
proxy_pass http://127.0.0.1:6060/assets;
recursive_error_pages on;
proxy_intercept_errors on;
error_page 301 302 307 = @handle_redirect;
}
location /internal/assets {
internal;
alias /home/penpot/penpot/backend/resources/public/assets;
add_header x-accel-redirect "$upstream_http_x_accel_redirect";
}
location /api {
proxy_pass http://127.0.0.1:6060/api;
}
location /export {
@ -112,8 +113,9 @@ http {
proxy_pass http://127.0.0.1:6060/ws/notifications;
}
location /media {
alias /home/penpot/penpot/backend/resources/public/media;
location / {
root /home/penpot/penpot/frontend/resources/public;
add_header Cache-Control "no-cache, max-age=0";
}
}
}