Sys-ctl-rpr-container-soft Role

Description: Automated recovery service restarting exited or unhealthy Docker Compose stacks and resolving port conflicts

Variables

  • author: Kevin Veen-Birkenbach

  • description: Automated recovery service restarting exited or unhealthy Docker Compose stacks and resolving port conflicts

  • license: Infinito.Nexus Community License (Non-Commercial)

  • company: Kevin Veen-Birkenbach https://www.veen.world

  • min_ansible_version: 2.9

  • platforms: [{‘name’: ‘ArchLinux’, ‘versions’: [‘all’]}, {‘name’: ‘Debian’, ‘versions’: [‘all’]}, {‘name’: ‘EL’, ‘versions’: [‘all’]}, {‘name’: ‘Fedora’, ‘versions’: [‘all’]}, {‘name’: ‘Ubuntu’, ‘versions’: [‘all’]}]

  • galaxy_tags: [‘docker’, ‘compose’, ‘systemd’, ‘automation’, ‘archlinux’]

  • issue_tracker_url: https://s.infinito.nexus/issues

README

Docker Healer

Description

This Ansible role automatically restarts Docker Compose configurations with exited or unhealthy containers on Arch Linux systems. It ensures the stability of containerized workloads by recovering from common error conditions like port binding issues.

Overview

Tailored for Arch Linux, this role monitors containers for failure states and initiates a controlled restart of affected Compose configurations. If port conflicts prevent recovery, the role stops the affected stack, restarts Docker, and recreates the container environment.

Cosmos

The diagram places Docker Healer in the Infinito.Nexus cosmos: the components it deploys (capabilities), the central services it consumes (dependencies), and its outward reach (federation and bridged external networks).

flowchart LR
    subgraph role [sys-ctl-rpr-container-soft 💻]
        svc_container_soft["container-soft"]
    end

Solid 1:1 edges are fixed relationships; dashed 0..1 edges are conditional (enabled only in matching deployments); red 0..0 edges are turned off in this role. Node markers show the role’s deploy modes (💻 host, 🐳 compose, 🐝 swarm); ❌ marks a service that is explicitly turned off, and ⚙️ an Ansible role dependency declared in meta/main.yml.

Purpose

The purpose of this role is to provide automated healing for Docker Compose environments, minimizing manual recovery effort and reducing downtime.

Features

  • Container Health Monitoring: Detects unhealthy or exited containers.

  • Automated Recovery: Restarts failed containers and resolves port binding issues.

  • Run-once Setup Logic: Ensures idempotent execution by controlling task flow with internal flags.

  • System Role Integration: Seamlessly integrates with Infinito.Nexus system maintenance logic.

Credits

Implemented by Kevin Veen-Birkenbach. Part of the Infinito.Nexus Project and maintained by Kevin Veen-Birkenbach. Licensed under the Infinito.Nexus Community License (Non-Commercial).