Skip to content

Conversation

@mihow
Copy link
Collaborator

@mihow mihow commented Jan 31, 2026

Add missing host alias in docker compose config to allow production web app and workers to connect to external NATS server.

@netlify
Copy link

netlify bot commented Jan 31, 2026

Deploy Preview for antenna-preview canceled.

Name Link
🔨 Latest commit c4b04e1
🔍 Latest deploy log https://app.netlify.com/projects/antenna-preview/deploys/697dcf6863e6dc00082a8306

@netlify
Copy link

netlify bot commented Jan 31, 2026

Deploy Preview for antenna-ssec canceled.

Name Link
🔨 Latest commit c4b04e1
🔍 Latest deploy log https://app.netlify.com/projects/antenna-ssec/deploys/697dcf6850988100080ec7ab

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 31, 2026

📝 Walkthrough

Walkthrough

Two docker-compose files are updated to add NATS host mapping to the django service's extra_hosts configuration, mirroring existing entries for db, rabbitmq, and redis. This enables DNS resolution for the NATS service across both production and worker deployments.

Changes

Cohort / File(s) Summary
NATS Host Resolution
docker-compose.production.yml, docker-compose.worker.yml
Added nats:${NATS_IP} entry to the django service's extra_hosts, allowing DNS resolution of the NATS service in both production and worker environments.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Through compose files, we skip and hop,
NATS finds a home, no need to stop!
Extra hosts now know the way,
Django and NATS in harmony play,
DNS magic saves the day! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided. The required template sections (Summary, List of Changes, Related Issues, Detailed Description, Testing, Deployment Notes, and Checklist) are entirely missing. Add a complete PR description following the template, including a summary of changes, list of modifications to both docker-compose files, related issue reference, detailed explanation of the NATS host configuration, testing instructions, and the completed checklist.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a NATS host alias to production Docker configuration files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/nats-host-config

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docker-compose.production.yml (1)

19-23: ⚠️ Potential issue | 🔴 Critical

The change is syntactically correct but reveals critical setup gaps.

The YAML anchor inheritance is properly implemented (django: &django propagates to celeryworker, celerybeat, and flower), and the NATS entry follows the established pattern for external service host mappings.

However, verification shows that:

  • The referenced environment file (.envs/.production/.django) does not exist in the repository
  • NATS_IP and other external service IP variables (DATABASE_IP, RABBITMQ_IP, REDIS_IP) are completely undocumented in the codebase
  • No .env templates or examples are provided

Since the production configuration depends on external services running outside Docker, ensure that:

  1. Environment file templates (.envs/.production/.django.example or similar) document all required IP variables
  2. Deployment documentation includes setup instructions for configuring NATS_IP, DATABASE_IP, RABBITMQ_IP, and REDIS_IP
  3. The configuration is deployable without guessing which environment variables are needed

@mihow mihow merged commit ad808f6 into main Jan 31, 2026
7 checks passed
@mihow mihow deleted the fix/nats-host-config branch January 31, 2026 10:01
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