Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
phbrgnomo opened this issue Oct 15, 2024 · 0 comments
Open

Comments

@phbrgnomo
Copy link

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.

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

No branches or pull requests

1 participant