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:
parent
7aca62e9fa
commit
f9faea1851
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue