mirror of
https://github.com/penpot/penpot.git
synced 2025-05-31 05:46:12 +02:00
43 lines
967 B
Text
43 lines
967 B
Text
server {
|
|
listen 8080 default_server;
|
|
listen [::]:8080 default_server;
|
|
|
|
server_name _;
|
|
|
|
gzip on;
|
|
gzip_static on;
|
|
gzip_proxied any;
|
|
gzip_types text/plain text/html text/css text/javascript application/javascript application/json application/transit+json;
|
|
|
|
# Frontend
|
|
location / {
|
|
root /usr/share/nginx/html/;
|
|
|
|
try_files $uri /index.html;
|
|
add_header Cache-Control "max-age=15552000" always;
|
|
}
|
|
|
|
location /view {
|
|
alias /usr/share/nginx/html/view;
|
|
}
|
|
|
|
location /media {
|
|
alias /srv/uxbox/media;
|
|
}
|
|
|
|
location /static {
|
|
alias /srv/uxbox/static;
|
|
}
|
|
|
|
# Backend
|
|
location /api/ {
|
|
proxy_pass http://backend:6060/api/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection 'upgrade';
|
|
proxy_set_header Host $host;
|
|
proxy_cache_bypass $http_upgrade;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
}
|