-
Notifications
You must be signed in to change notification settings - Fork 11
fix: add host alias to NATS in production #1109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for antenna-preview canceled.
|
✅ Deploy Preview for antenna-ssec canceled.
|
📝 WalkthroughWalkthroughTwo 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
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this 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 | 🔴 CriticalThe change is syntactically correct but reveals critical setup gaps.
The YAML anchor inheritance is properly implemented (
django: &djangopropagates toceleryworker,celerybeat, andflower), 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 repositoryNATS_IPand other external service IP variables (DATABASE_IP,RABBITMQ_IP,REDIS_IP) are completely undocumented in the codebase- No
.envtemplates or examples are providedSince the production configuration depends on external services running outside Docker, ensure that:
- Environment file templates (
.envs/.production/.django.exampleor similar) document all required IP variables- Deployment documentation includes setup instructions for configuring
NATS_IP,DATABASE_IP,RABBITMQ_IP, andREDIS_IP- The configuration is deployable without guessing which environment variables are needed
Add missing host alias in docker compose config to allow production web app and workers to connect to external NATS server.