fix: disable fnos web cache for live debugging

This commit is contained in:
kris
2026-03-26 22:20:34 +08:00
parent 82560d1415
commit 2a1e2201fb
3 changed files with 29 additions and 0 deletions

View File

@@ -7,3 +7,4 @@ services:
- "${STORYFORGE_WEB_V4_DEV_PORT:-19192}:80"
volumes:
- ../../storyforge/web/storyforge-web-v4:/usr/share/nginx/html:ro
- ./storyforge-fnos-web-v4.nginx.conf:/etc/nginx/conf.d/default.conf:ro

View File

@@ -0,0 +1,27 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location = /index.html {
add_header Cache-Control "no-store";
try_files $uri =404;
}
location = /assets/storyforge-runtime-config.js {
add_header Cache-Control "no-store";
try_files $uri =404;
}
location /assets/ {
add_header Cache-Control "no-store";
try_files $uri =404;
}
location / {
add_header Cache-Control "no-store";
try_files $uri $uri/ /index.html;
}
}

View File

@@ -94,6 +94,7 @@ echo "[3/6] sync runtime config override"
echo "[4/6] sync compose file"
"$FNOS_SCP" "$REMOTE_COMPOSE_DIR" "$ROOT/deploy/storyforge-fnos-web-v4.compose.yaml"
"$FNOS_SCP" "$REMOTE_COMPOSE_DIR" "$ROOT/deploy/storyforge-fnos-web-v4.nginx.conf"
echo "[5/6] restart fnOS web container"
run_remote_sudo "$PASSWORD" "cd $(shell_quote "$REMOTE_COMPOSE_DIR") && STORYFORGE_WEB_V4_DEV_PORT=$(shell_quote "$WEB_PORT") docker compose -f $(shell_quote "$REMOTE_COMPOSE_FILE") up -d --force-recreate storyforge-web-v4-dev && STORYFORGE_WEB_V4_DEV_PORT=$(shell_quote "$WEB_PORT") docker compose -f $(shell_quote "$REMOTE_COMPOSE_FILE") ps"