chore(realtime): address PR review feedback

- Remove redundant SOCKET_PORT=3002 env from Dockerfile runner stage
  (env.PORT already defaults to 3002 via zod schema).
- Reorder PORT fallback so an explicitly-set SOCKET_PORT wins over
  the schema default for PORT; keeps SOCKET_PORT functional as an
  override instead of dead code.
- Add dedicated type-check CI step for @sim/realtime so TS errors
  surface pre-deploy (the Dockerfile runs source TS via Bun and has
  no implicit build-time type check).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Waleed Latif
2026-04-22 22:55:32 -07:00
parent ad9855dff5
commit 86dbab6aa6
3 changed files with 4 additions and 2 deletions

View File

@@ -109,6 +109,9 @@ jobs:
- name: Verify realtime prune graph
run: bun run check:realtime-prune
- name: Type-check realtime server
run: bunx turbo run type-check --filter=@sim/realtime
- name: Run tests with coverage
env:
NODE_OPTIONS: '--no-warnings --max-old-space-size=8192'

View File

@@ -29,7 +29,7 @@ async function createRoomManager(io: SocketIOServer): Promise<IRoomManager> {
async function main() {
const httpServer = createServer()
const PORT = Number(env.PORT || env.SOCKET_PORT || 3002)
const PORT = Number(env.SOCKET_PORT ?? env.PORT ?? 3002)
logger.info('Starting Socket.IO server...', {
port: PORT,

View File

@@ -37,7 +37,6 @@ WORKDIR /app
ENV NODE_ENV=production \
PORT=3002 \
SOCKET_PORT=3002 \
HOSTNAME="0.0.0.0"
RUN addgroup -g 1001 -S nodejs && \