Skip to content

Conversation

@mrrobot47
Copy link
Member

Fixes: #316

This PR fixes a critical issue where Docker containers don't automatically restart after server reboot, causing complete service outages until manual intervention.

Changes Made

Added restart: unless-stopped policy to all services across three Docker Compose template files:

1. docker-compose.tmpl (Site Services)

  • ✅ frappe - Added restart policy
  • ✅ nginx - Added restart policy
  • ✅ socketio - Added restart policy
  • ✅ schedule - Added restart policy
  • ✅ redis-cache - Added restart policy
  • ✅ redis-queue - Added restart policy

2. docker-compose.workers.tmpl (Worker Services)

  • ✅ worker-name - Added restart policy

3. docker-compose.admin-tools.tmpl (Admin Tools)

  • ✅ mailpit - Added restart policy
  • ✅ adminer - Added restart policy

4. docker-compose.services.tmpl (Global Services)

  • ✅ global-db - Already has restart: always (no change needed)
  • ✅ global-nginx-proxy - Already has restart: always (no change needed)

Copilot AI review requested due to automatic review settings November 19, 2025 06:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses a critical issue where Docker containers fail to automatically restart after server reboot by adding restart policies to all service definitions across three Docker Compose template files.

  • Added restart: unless-stopped policy to site-level services, workers, and admin tools
  • Ensures automatic recovery from server reboots without manual intervention
  • Maintains consistency with existing global services that already use restart: always

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
frappe_manager/templates/docker-compose.tmpl Added restart policy to 6 site services (frappe, nginx, socketio, schedule, redis-cache, redis-queue)
frappe_manager/templates/docker-compose.workers.tmpl Added restart policy to worker service template
frappe_manager/templates/docker-compose.admin-tools.tmpl Added restart policy to admin tools (mailpit, adminer)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Xieyt
Copy link
Collaborator

Xieyt commented Nov 28, 2025

This PR also need to cover the migration of previous site and we should also provide a flag at the time of creation of site like --restart <always/none> so that user has option to not always have this for some sites.

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 containers don't restart after server reboot

3 participants