fix: connect frontend to sync server for multiplayer

NEXT_PUBLIC_SYNC_URL was never set, so useRoom always fell into
local-only mode — users couldn't see other joiners. Added build arg
to bake wss://sync.rmaps.online into the client bundle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-18 23:34:04 +00:00
parent 7aca62e9fa
commit f9faea1851
2 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,9 @@ COPY rmaps-online/ .
ENV NEXT_TELEMETRY_DISABLED=1 ENV NEXT_TELEMETRY_DISABLED=1
ENV NODE_ENV=production ENV NODE_ENV=production
# Sync server URL baked into client bundle at build time
ARG NEXT_PUBLIC_SYNC_URL
ENV NEXT_PUBLIC_SYNC_URL=${NEXT_PUBLIC_SYNC_URL}
RUN npm run build RUN npm run build

View File

@ -5,6 +5,8 @@ services:
build: build:
context: .. context: ..
dockerfile: rmaps-online/Dockerfile dockerfile: rmaps-online/Dockerfile
args:
- NEXT_PUBLIC_SYNC_URL=wss://sync.rmaps.online
container_name: rmaps-online container_name: rmaps-online
restart: unless-stopped restart: unless-stopped
environment: environment: