fix(release): adds notifications to docker setup#1368
Conversation
|
""" WalkthroughA notifications service was integrated into the Docker Compose environment, including development, production, and build configurations. The notifications app's package.json was updated with new scripts and dependencies. Environment variables and database configuration were adjusted to support the new service, and related dependencies were cleaned up from the root package.json. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant Docker as Docker Compose
participant Notifications as Notifications Service
participant DB as Database
Dev->>Docker: Start environment
Docker->>DB: Start DB service
Docker->>Notifications: Start notifications service (waits for DB health)
Notifications->>DB: Run migrations (predev/preprod)
Notifications->>Dev: Service ready on port 3000
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (6)
⏰ Context from checks skipped due to timeout of 90000ms (5)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1368 +/- ##
========================================
Coverage 35.22% 35.22%
========================================
Files 805 805
Lines 19592 19592
Branches 3621 3611 -10
========================================
Hits 6901 6901
+ Misses 12104 11958 -146
- Partials 587 733 +146
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
packages/docker/.env.sandbox.docker-compose-dev (1)
27-27: NormalizePOSTGRES_DBSassignment
If you decide to switch all entries toKEY=VALUE, also update this line:- POSTGRES_DBS: console-users,console-akash-sandbox,notification_service,events + POSTGRES_DBS=console-users,console-akash-sandbox,notification_service,eventspackages/docker/docker-compose.prod.yml (1)
42-42: Enhance startup ordering with a healthcheckThe
deploy-webservice now depends onnotifications, but Compose v3’sdepends_ononly waits for containers to start, not for services to be ready. Consider adding ahealthcheckto thenotificationsservice and usingcondition: service_healthyto ensuredeploy-webdoesn’t start before notifications is fully up.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (7)
apps/notifications/package.json(2 hunks)package.json(0 hunks)packages/docker/.env.sandbox.docker-compose-dev(2 hunks)packages/docker/docker-compose.build.yml(1 hunks)packages/docker/docker-compose.dev.yml(1 hunks)packages/docker/docker-compose.prod-with-db.yml(1 hunks)packages/docker/docker-compose.prod.yml(2 hunks)
💤 Files with no reviewable changes (1)
- package.json
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: validate-api
- GitHub Check: test-provider-console-build
- GitHub Check: test-deploy-web-build
- GitHub Check: validate-notifications
🔇 Additional comments (4)
packages/docker/docker-compose.dev.yml (1)
11-19:Details
✅ Verification successful
Dev build block for
notificationslooks correct
The service follows the same pattern as other dev services (target=development, code mounts). Ensure your default Dockerfile inpackages/dockersupports this build context and stage.You can verify the Dockerfile’s presence with:
🏁 Script executed:
#!/bin/bash # Verify the default Dockerfile is reachable fd Dockerfile.node | grep -q 'packages/docker/Dockerfile.node' && echo "✔ Dockerfile found"Length of output: 109
🏁 Script executed:
#!/bin/bash # Verify the Dockerfile.node has a 'development' build stage if grep -i -q -E 'FROM .+ as development' packages/docker/Dockerfile.node; then echo "✔ development stage found" else echo "✖ 'development' stage missing" fiLength of output: 133
Dev build block for
notificationsconfirmed
- Verified
packages/docker/Dockerfile.nodeexists- Confirmed it includes a
developmentbuild stageNo further changes needed.
apps/notifications/package.json (2)
10-11: Addedpredevscript to run migrations before development
This guarantees your schema is up-to-date when runningnpm run dev. Nice improvement!
16-17: Addedpreprodscript and streamlinedprod
Separating migrations into pre-scripts keeps the startup commands focused. Well done.packages/docker/docker-compose.build.yml (1)
12-20: Build configuration fornotificationsaligns with other services
The image, build context, Dockerfile, target, and args match the established pattern. No issues found here.
0b80ad6 to
19280e2
Compare
Summary by CodeRabbit
New Features
Chores