Files
pgames-manager/frontend/nginx.conf
T
mrleo1nidandClaude Opus 5.5 364b312064 Initial MVP: local visual novel library with Ren'Py → PGVN converter
- FastAPI backend: admin bootstrap with forced credential change, admin-created
  users with one-time generated passwords, roles as permission sets
- Games and versions with content-addressed blob storage; forks copy only the
  manifest, so mods share assets with the original
- Worker: archive/RPA extraction, unrpyc for .rpyc, own .rpy parser, Python
  subset translated via ast, media converted to WebP/Opus/WebM
- React panel (library search, game page, upload, users, roles) and a
  framework-free web player with saves, history, skip/auto, transitions
- docker compose: postgres, backend, worker, nginx on a single HTTP port

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 02:41:32 +03:00

50 lines
1.4 KiB
Nginx Configuration File

server {
listen 80;
server_name _;
# archives with games can be many gigabytes
client_max_body_size 0;
root /usr/share/nginx/html;
location /api/ {
proxy_pass http://backend:8000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_request_buffering off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
}
# content-addressed blobs: /blobs/<sha256><ext> -> /data/blobs/ab/cd/<id>
location ~ "^/blobs/(([0-9a-f]{2})([0-9a-f]{2})[0-9a-f]{60}(\.[a-z0-9]{1,8})?)$" {
alias /data/blobs/$2/$3/$1;
add_header Cache-Control "public, max-age=31536000, immutable";
types {
image/webp webp;
image/png png;
audio/ogg ogg;
video/webm webm;
application/json json;
font/ttf ttf;
font/otf otf;
font/woff woff;
font/woff2 woff2;
}
default_type application/octet-stream;
gzip on;
gzip_types application/json;
}
location /assets/ {
add_header Cache-Control "public, max-age=31536000, immutable";
}
location / {
try_files $uri /index.html;
add_header Cache-Control "no-cache";
}
}