From f9faea18518379f80ee0487888609b00c8e16ff8 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Wed, 18 Feb 2026 23:34:04 +0000 Subject: [PATCH] fix: connect frontend to sync server for multiplayer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Dockerfile | 3 +++ docker-compose.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 52acc98..1b0d4ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,6 +23,9 @@ COPY rmaps-online/ . ENV NEXT_TELEMETRY_DISABLED=1 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 diff --git a/docker-compose.yml b/docker-compose.yml index 6c26880..c0868f1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,8 @@ services: build: context: .. dockerfile: rmaps-online/Dockerfile + args: + - NEXT_PUBLIC_SYNC_URL=wss://sync.rmaps.online container_name: rmaps-online restart: unless-stopped environment: