Files
image2api/frontend/default.conf.template
chiyiandClaude Opus 4.8 6acc428e74 docker: 前端 nginx HTTP :2000(外部反代接管域名/TLS,不再内置证书);README + logo
- docker-compose.yml:去 acme,web 端口 2000(WEB_PORT),CORS_ORIGINS/COOKIE_SECURE 直配,清理证书 volumes
- frontend nginx 模板/Dockerfile:纯 HTTP :2000,删自签证书 + cert-watch 入口脚本
- 删除 install.sh、.env.docker.example(compose 直接 up,不再需要一键脚本/模板)
- README(中英):部署改为 Docker(2000端口反代)+ 源码两法;去 acme/自动 HTTPS 表述;结构/徽章同步;顶部加 Vivid logo(favicon.svg);视频 720p/1080p 分辨率对照表(DocsView)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 09:58:59 +08:00

46 lines
1.6 KiB
Plaintext

# nginx for the docker stack — HTTP only on :2000. TLS + domain are handled by
# the user's OWN reverse proxy placed in front of this container; this just serves
# the SPA and reverse-proxies the API to the backend.
server {
listen 2000;
listen [::]:2000;
server_name _;
root /usr/share/nginx/html;
index index.html;
client_max_body_size 50m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# video / large-image generation can block minutes — avoid the 60s 504.
proxy_connect_timeout 600s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;
# Hashed build assets never change — cache hard.
location /assets/ {
expires 1y;
add_header Cache-Control "public, max-age=31536000, immutable";
}
# SPA fallback; index.html must never be cached (else stale bundle hash).
location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
# ---- API / media / health -> backend ----
location ^~ /admin/api/ { proxy_pass http://backend:6666; add_header Cache-Control "no-store" always; }
location ^~ /images/ { proxy_pass http://backend:6666; }
location = /health { proxy_pass http://backend:6666; }
# /v1 is per-API-key authenticated — never cache.
location ^~ /v1/ {
proxy_pass http://backend:6666;
add_header Cache-Control "no-store" always;
}
}