mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-28 03:00:29 -04:00
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:
3
.github/workflows/test-build.yml
vendored
3
.github/workflows/test-build.yml
vendored
@@ -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'
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 && \
|
||||
|
||||
Reference in New Issue
Block a user