🐛 Fix problem with shadow-cljs websocket connection

This commit is contained in:
alonso.torres 2026-06-01 11:37:06 +02:00
parent ed679c15bb
commit 4b8d2d5c1d
4 changed files with 16 additions and 2 deletions

View File

@ -48,6 +48,7 @@ AWS_SECRET_ACCESS_KEY=penpot-devenv
# PENPOT_PUBLIC_HTTP_PORT. Container-internal ports remain fixed; per-instance
# overlays may offset these host-side values.
PENPOT_PUBLIC_HTTP_PORT=3449
SHADOW_SERVER_URL=wss://localhost:3449
PENPOT_MCP_SERVER_PORT=4401
PENPOT_MCP_REPL_PORT=4403

View File

@ -136,6 +136,13 @@ http {
proxy_http_version 1.1;
}
location /api/remote-relay {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_pass http://127.0.0.1:3448;
proxy_http_version 1.1;
}
location /mcp/ws {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';

View File

@ -10,7 +10,8 @@
:output-dir "resources/public/js/"
:asset-path "/js"
:devtools {:watch-dir "resources/public"
:reload-strategy :full}
:reload-strategy :full
:server-url #shadow/env ["SHADOW_SERVER_URL" :default ""]}
:build-options {:manifest-name "manifest.json"}
:modules
{:shared
@ -86,7 +87,8 @@
{:target :browser
:output-dir "resources/public/js/worker/"
:asset-path "/js/worker"
:devtools {:browser-inject :main
:devtools {:server-url #shadow/env ["SHADOW_SERVER_URL" :default ""]
:browser-inject :main
:watch-dir "resources/public"
:reload-strategy :full}
:build-options {:manifest-name "manifest.json"}

View File

@ -331,6 +331,10 @@ SERENA_DASHBOARD_EXTERNAL_PORT=${serena_dash}
# to a single Valkey Pub/Sub. See mem:devenv/core.
PENPOT_BACKEND_WORKER=false
# shadow-cljs relay proxied through nginx so the browser can reach it without
# a separate published port. URL must match the instance's public HTTPS port.
SHADOW_SERVER_URL=wss://localhost:${public}
# Workspace bind mount (computed in manage.sh too, but recorded here for
# clarity when inspecting the env file).
PENPOT_SOURCE_PATH=${workspace}