Skip to content

Commit 86dbab6

Browse files
waleedlatif1claude
andcommitted
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>
1 parent ad9855d commit 86dbab6

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/test-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ jobs:
109109
- name: Verify realtime prune graph
110110
run: bun run check:realtime-prune
111111

112+
- name: Type-check realtime server
113+
run: bunx turbo run type-check --filter=@sim/realtime
114+
112115
- name: Run tests with coverage
113116
env:
114117
NODE_OPTIONS: '--no-warnings --max-old-space-size=8192'

apps/realtime/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async function createRoomManager(io: SocketIOServer): Promise<IRoomManager> {
2929

3030
async function main() {
3131
const httpServer = createServer()
32-
const PORT = Number(env.PORT || env.SOCKET_PORT || 3002)
32+
const PORT = Number(env.SOCKET_PORT ?? env.PORT ?? 3002)
3333

3434
logger.info('Starting Socket.IO server...', {
3535
port: PORT,

docker/realtime.Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ WORKDIR /app
3737

3838
ENV NODE_ENV=production \
3939
PORT=3002 \
40-
SOCKET_PORT=3002 \
4140
HOSTNAME="0.0.0.0"
4241

4342
RUN addgroup -g 1001 -S nodejs && \

0 commit comments

Comments
 (0)