Skip to content

Commit caa6c58

Browse files
Nihisilclaude
andcommitted
fix: copy frontend/public into Docker image and set WS origin
The Dockerfile only copied frontend/dist (built assets) but not frontend/public/ (static files). This caused /static/game-redirect.js to 404 since the lobby app silently skips mounting /static when the directory is missing. Also adds LOBBY_WS_ALLOWED_ORIGIN so WebSocket origin checks pass in production. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 73dfd33 commit caa6c58

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

deploy/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ COPY backend/ backend/
9292
# Copy built frontend assets from the frontend-builder stage.
9393
# All production assets (game client + lobby CSS) are content-hashed in dist/.
9494
COPY --from=frontend-builder /app/frontend/dist /app/frontend/dist
95+
# Static files served at /static (game-redirect.js, env.js, logo, etc.)
96+
COPY frontend/public /app/frontend/public
9597

9698
# Create directories for runtime data
9799
RUN mkdir -p /app/data/logs /app/data/replays /app/data/db && \

deploy/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ services:
4040
LOBBY_GAME_ASSETS_DIR: /app/frontend/dist
4141
LOBBY_GAME_CLIENT_URL: /game
4242
LOBBY_ALLOWED_HOSTS: %%DOMAIN%%,localhost
43+
LOBBY_WS_ALLOWED_ORIGIN: https://%%DOMAIN%%
4344
LOBBY_LOG_DIR: /app/data/logs/lobby
4445
LOG_FORMAT: json
4546
LOG_LEVEL: ${LOG_LEVEL:-info}

0 commit comments

Comments
 (0)