Skip to content

fix: copy shared package dist into service node_modules in production Dockerfiles - #33

Merged
rsun19 merged 1 commit into
mainfrom
add-symlinks
May 11, 2026
Merged

rsun19 merged 1 commit into
mainfrom
add-symlinks

Conversation

@rsun19

@rsun19 rsun19 commented May 11, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the production Docker images for all six microservices so the @transit-tracker/shared package is available at runtime.

Problem

The shared package is a local workspace dependency resolved via symlinks during development, but those symlinks don't exist inside the production Docker image, causing module resolution failures at startup.

Fix

In the production stage of each service Dockerfile, explicitly copy the built shared package into the service's node_modules/@transit-tracker/shared:

RUN rm -rf node_modules/@transit-tracker/shared && mkdir -p node_modules/@transit-tracker/shared
COPY --from=builder /app/packages/shared/dist node_modules/@transit-tracker/shared/dist
COPY --from=builder /app/packages/shared/package.json node_modules/@transit-tracker/shared/package.json

Affects: agencies, alerts, ingestion, routes, stops, vehicles

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@rsun19 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 33 minutes before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cdeb8200-c247-4d24-a9e7-9fc368305ee5

📥 Commits

Reviewing files that changed from the base of the PR and between 46b274a and f35c556.

📒 Files selected for processing (6)
  • services/agencies/Dockerfile
  • services/alerts/Dockerfile
  • services/ingestion/Dockerfile
  • services/routes/Dockerfile
  • services/stops/Dockerfile
  • services/vehicles/Dockerfile
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-symlinks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rsun19
rsun19 merged commit 9402f63 into main May 11, 2026
11 checks passed
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.

1 participant