fix(deploy): expose generated video files

This commit is contained in:
Xiaoxia AI
2026-06-20 23:40:47 +08:00
parent 1e3a52fa17
commit bcfad4ad6a
3 changed files with 16 additions and 1 deletions
+5
View File
@@ -66,6 +66,11 @@ services:
volumes:
generated-files:
driver: local
driver_opts:
type: none
o: bind
device: /host/var/lib/xiaoxia-saas-staging/generated
networks:
xiaoxia-net:
+1 -1
View File
@@ -22,7 +22,7 @@ ensure_container_running() {
cd "$ROOT_DIR"
cp "$ENV_FILE" "$ROOT_DIR/.env"
mkdir -p "$ROOT_DIR/apps/web/public"
mkdir -p "$ROOT_DIR/apps/web/public" /host/var/lib/xiaoxia-saas-staging/generated
[ -f "$ROOT_DIR/apps/web/public/.keep" ] || printf 'placeholder' > "$ROOT_DIR/apps/web/public/.keep"
ensure_container_running xiaoxia-postgres
+10
View File
@@ -59,6 +59,16 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Generated video files
location /generated-files/ {
alias /var/lib/xiaoxia-saas-staging/generated/;
types {
video/mp4 mp4;
}
default_type application/octet-stream;
add_header Cache-Control "public, max-age=3600";
}
# SaaS Web(默认路径)
location / {