You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added the missing packages/logger copy step to the realtime Dockerfile runner stage. The socket server (apps/sim/socket/index.ts) imports @sim/logger and uses it extensively across 12 files for logging connection events, errors, and HTTP requests. Without this package being copied to the runtime container, the socket server would fail at startup with a module resolution error.
The fix follows the existing pattern established in the Dockerfile where packages/db is already copied (line 63), placing the logger package copy right after it before the sim app copy. The deps and builder stages already included the logger package, so only the runner stage was missing this dependency.
Fixed missing workspace dependency that would cause runtime failure
Maintains proper Docker layer caching by placing the logger package copy between db package and sim app
Consistent with the deps stage which already includes logger package configuration
Confidence Score: 5/5
This PR is safe to merge - it fixes a critical runtime dependency issue
The change adds a missing workspace package that is required by the socket server. The socket server imports @sim/logger in 12 files, and without this copy step, the Docker container would fail at runtime. The fix follows the exact pattern already established for the db package and maintains proper Docker layer ordering for cache efficiency.
No files require special attention
Important Files Changed
Filename
Overview
docker/realtime.Dockerfile
Added missing logger package copy to fix runtime dependency issue in socket server
Sequence Diagram
sequenceDiagram
participant Builder as Builder Stage
participant Runner as Runner Stage
participant SocketServer as Socket Server
participant Logger as @sim/logger
Note over Builder,Runner: Docker Build Process
Builder->>Builder: Copy packages/logger to /app/packages/logger
Builder->>Runner: COPY packages/db to runner
Builder->>Runner: COPY packages/logger to runner (NEW FIX)
Builder->>Runner: COPY apps/sim to runner
Note over Runner,Logger: Runtime Execution
Runner->>SocketServer: Execute: bun apps/sim/socket/index.ts
SocketServer->>Logger: import { createLogger } from '@sim/logger'
alt Without Fix
Logger--xSocketServer: Module not found error
SocketServer--xRunner: Startup failure
end
alt With Fix
Logger->>SocketServer: Return logger instance
SocketServer->>Logger: logger.info() across 12 files
SocketServer->>Runner: Successful startup
end
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Testing
Tested manually
Checklist