fix: use restart: always in production docker compose#132
fix: use restart: always in production docker compose#132
Conversation
Follow Docker Compose production best practices by using restart: always instead of restart: unless-stopped for all services. Closes #64 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the resilience and availability of the application's production environment by modifying the Docker Compose configuration. By changing the restart policy for all services, the system will now automatically recover from unexpected shutdowns or reboots, ensuring continuous operation without manual intervention. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 19.0 #132 +/- ##
==========================================
- Coverage 69.96% 69.96% -0.01%
==========================================
Files 832 832
Lines 48813 48768 -45
==========================================
- Hits 34154 34121 -33
+ Misses 14659 14647 -12
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request updates the restart policy for services in the production Docker Compose file to restart: always, aligning with Docker's recommendations for production environments. While this improves service availability, I've pointed out a few areas where this policy might introduce risks, particularly for services that are not long-running daemons or those without healthchecks. My suggestions aim to improve the robustness of the configuration by preventing potential restart loops.
Add process-based healthcheck using pgrep to detect if the job_worker process is running, complementing the restart: always policy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
restart: unless-stoppedtorestart: alwaysfor all services indocker/docker-compose.production.ymlCloses #64
Test plan
docker compose -f docker/docker-compose.production.yml configparses without errorsrestart: alwaysin the parsed output🤖 Generated with Claude Code