Skip to content

Add healthcheck dan autoheal to the docker compose files generated #65

@phbrgnomo

Description

@phbrgnomo

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
Add the following parameter to the servers on the docker-compose.yml file:

    healthcheck:
      test: ['CMD-SHELL', 'guacctl ping']
      interval: 1m30s
      timeout: 10s
      retries: 3
      start_period: 40s
    labels:
      - autoheal=true

(This is an example of a guacamole container)

This make the containers send a signal about their health.

the autoheal tag link to another separated container:

services:
  autoheal:
    image: willfarrell/autoheal
    container_name: autoheal
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock  # Necessário para monitorar os containers
    environment:
      - AUTOHEAL_CONTAINER_LABEL=autoheal  # Autoheal verifica containers com essa label
      - AUTOHEAL_INTERVAL=30  # Opcional: Verifica a cada 30 segundos (padrão é 5s)
      - AUTOHEAL_START_PERIOD=60  # Opcional: Aguarda 60s antes de começar (padrão é 0s)

This one fix any unhealthy container.

Pretty useful to quickly restart unhealthy containers

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions