Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • add tsconfig to db dockerfile

Type of Change

  • Bug fix

Testing

N/A

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Dec 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
docs Ready Ready Preview, Comment Dec 28, 2025 8:28pm

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 28, 2025

Greptile Summary

This PR adds the @sim/tsconfig package to the db Dockerfile to fix a build issue introduced in PR #2613. The db package's tsconfig.json extends @sim/tsconfig/library.json, creating a workspace dependency that wasn't previously available in the Docker build context.

Changes made:

  • Added packages/tsconfig directory creation in the deps stage
  • Copied packages/tsconfig/package.json during dependency installation
  • Added full packages/tsconfig directory copy in the runner stage (before copying db package)

Context:
The @sim/db package declares @sim/tsconfig as a dev dependency ("@sim/tsconfig": "workspace:*") and extends its configurations. Without this package available in the Docker image, TypeScript compilation and type-checking would fail. This fix brings db.Dockerfile into alignment with app.Dockerfile and realtime.Dockerfile, which already handle the tsconfig package (though they copy all packages wholesale).

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a straightforward bug fix that adds a missing dependency to the Docker build. The implementation follows the same pattern used in other Dockerfiles (app.Dockerfile and realtime.Dockerfile), ensures proper layering for Docker cache efficiency, and directly addresses a build failure introduced in PR improvement(monorepo): added tsconfig package, resolved type errors in testing package #2613. No security concerns or logical errors present.
  • No files require special attention

Important Files Changed

Filename Overview
docker/db.Dockerfile Added @sim/tsconfig package to dependencies and runner stages to resolve workspace symlink resolution for TypeScript configurations

Sequence Diagram

sequenceDiagram
    participant Developer
    participant Docker as Docker Build
    participant Deps as Dependencies Stage
    participant Runner as Runner Stage
    participant TSConfig as @sim/tsconfig Package
    participant DB as @sim/db Package

    Developer->>Docker: Build db.Dockerfile
    Docker->>Deps: Start dependencies stage
    Deps->>Deps: Create packages/db and packages/tsconfig directories
    Deps->>Deps: Copy package.json files for db and tsconfig
    Deps->>Deps: Run bun install (resolves workspace dependencies)
    
    Docker->>Runner: Start runner stage
    Runner->>Runner: Copy node_modules from deps stage
    Runner->>Runner: Copy drizzle.config.ts
    Runner->>TSConfig: Copy packages/tsconfig directory
    Note over TSConfig: Contains base.json, library.json, etc.
    Runner->>DB: Copy packages/db directory
    Note over DB: db/tsconfig.json extends @sim/tsconfig/library.json
    DB->>TSConfig: Resolve workspace symlink
    Note over DB,TSConfig: TypeScript can now resolve shared configs
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments (1)

  1. docker/db.Dockerfile, line 39 (link)

    logic: Missing packages/tsconfig copy to runner stage. The @sim/db package extends @sim/tsconfig/library.json in its tsconfig, and when TypeScript resolves this at runtime (e.g., during type-checking with bun run type-check), it needs the actual tsconfig files. Since only node_modules is copied (line 33), the workspace symlink would be broken.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@waleedlatif1
Copy link
Collaborator Author

@greptile

@waleedlatif1 waleedlatif1 merged commit f44fc18 into staging Dec 28, 2025
11 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/build branch December 28, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants