Skip to content

fix: use restart: always in production docker compose#132

Open
atelal wants to merge 2 commits into19.0from
fix/docker-restart-always
Open

fix: use restart: always in production docker compose#132
atelal wants to merge 2 commits into19.0from
fix/docker-restart-always

Conversation

@atelal
Copy link
Contributor

@atelal atelal commented Mar 23, 2026

Summary

  • Changed restart: unless-stopped to restart: always for all services in docker/docker-compose.production.yml
  • Follows Docker Compose production best practices
  • Affects: traefik, db, odoo, queue-worker, backup, clamav

Closes #64

Test plan

  • Verify docker compose -f docker/docker-compose.production.yml config parses without errors
  • Confirm all services have restart: always in the parsed output

🤖 Generated with Claude Code

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>
@gemini-code-assist
Copy link

Summary of Changes

Hello, 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

  • Docker Compose Configuration: Updated the restart policy from unless-stopped to always for all services in docker/docker-compose.production.yml. This change ensures that services automatically restart even after a system reboot or Docker daemon restart, aligning with production best practices.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov
Copy link

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.96%. Comparing base (a8efe28) to head (1b38fc0).
⚠️ Report is 1 commits behind head on 19.0.

Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
spp_base_common 90.26% <ø> (ø)
spp_programs 45.51% <ø> (ø)
spp_security 66.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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>
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.

Docker compose: For a production image, the restart: always should be set.

1 participant