Skip to content

ci: update CI workflow and docker-compose for microservices build targets - #32

Merged
rsun19 merged 1 commit into
mainfrom
fix-ci-workflow
May 11, 2026
Merged

rsun19 merged 1 commit into
mainfrom
fix-ci-workflow

Conversation

@rsun19

@rsun19 rsun19 commented May 11, 2026

Copy link
Copy Markdown
Owner

Summary

Updates the CI pipeline and docker-compose.yml to align with the microservices split.

CI Changes (ci.yml)

  • Replaced single backend and worker build steps with individual build-and-push steps for each microservice: agencies, routes, stops, alerts, vehicles, ingestion
  • Each service gets its own GHA cache scope for faster incremental builds
  • Fixed frontend build arg: BACKEND_URL now points to http://nginx:80 instead of the old monolith http://backend:3000

docker-compose Changes

  • Added explicit target: production to all service build configs to ensure the correct Docker stage is used in production builds

Summary by CodeRabbit

  • Chores
    • Optimized Docker build configuration for production deployment across services.
    • Updated CI/CD pipeline to build and cache service images separately for improved deployment efficiency.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 37ba317e-bf5b-460a-b959-b75350552da8

📥 Commits

Reviewing files that changed from the base of the PR and between a7b4ecd and a9be025.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • docker-compose.yml

📝 Walkthrough

Walkthrough

The PR refactors the Docker build strategy from monolithic backend/worker images to separate production images for each transit service. Docker Compose and the CI/CD pipeline are updated to build and deploy agencies, routes, stops, alerts, vehicles, and ingestion as independent containerized services, with the frontend reconfigured to communicate via nginx instead of a direct backend service connection.

Changes

Microservices Docker Build Refactor

Layer / File(s) Summary
Docker Compose Build Targets
docker-compose.yml
Each of the agencies, routes, stops, alerts, vehicles, ingestion, and frontend services adds build.target: production to specify which Dockerfile build stage to use.
CI Microservice Image Build & Push
.github/workflows/ci.yml
The deploy job replaces the previous backend and worker image build steps with separate build-and-push steps for agencies, routes, stops, alerts, vehicles, and ingestion. Each uses a service-specific Dockerfile, targets production, pushes with commit SHA tags, and uses scoped GitHub Actions cache entries.
Frontend Backend URL Configuration
.github/workflows/ci.yml
Frontend Docker build argument BACKEND_URL is changed from http://backend:3000 to http://nginx:80 to reflect the updated service architecture.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • rsun19/transit-tracker#15: Both PRs modify the CI Docker build pipeline to target production build stages and scope build caches for container images.
  • rsun19/transit-tracker#14: Both PRs address building Docker production stages; the related PR adds target: production to CI build steps while this PR adds the same target to docker-compose service build configurations.
  • rsun19/transit-tracker#9: Both PRs modify the deploy job in .github/workflows/ci.yml; the related PR initially introduced the deploy job while this PR refactors it to build separate service images.

Poem

🐇 Microservices Dance

The monolith splits into pieces so bright,
Each service builds its production height,
Agencies, routes, and stops align,
Through nginx they chat—the gateway divine! 🚌✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: updating CI workflow and docker-compose configuration to support microservices build targets, which aligns with the changeset modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-ci-workflow

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 46b274a into main May 11, 2026
10 of 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