Metainformationen zur Seite
  •  

Healthcheck

Sämtliche Container haben einen implementierten Healthcheck, dieser kann über Portainer monitored werden.

http mit curl wie z.B. php

    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost"]
      interval: 30s
      timeout: 10s
      retries: 3

oder

    healthcheck:
      test: ["CMD", "curl", "-kf", "https://${URL}/"]
      interval: 30s
      timeout: 5s
      retries: 3

httpd

    healthcheck:
      test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/80' || exit 1
      interval: 30s
      timeout: 15s
      retries: 3

MySQL

    healthcheck:
      test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
      interval: 30s
      timeout: 10s
      retries: 3

MariaDB

    healthcheck:
      test: [ "CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized" ]
      start_period: 1m
      start_interval: 10s
      interval: 1m
      timeout: 5s
      retries: 3
      
oder

    healthcheck:
      test: ["CMD-SHELL", "bash", "-c", "cat </dev/tcp/localhost/3306"]
      interval: 10s
      timeout: 5s
      retries: 3

PostgreSQL

    healthcheck:
      test: ["CMD-SHELL", "pg_isready", "-d", "DiversityCollectionCache_SMNS-E-goldenwaspscoll"]
      interval: 5s
      timeout: 5s
      retries: 5
      start_period: 0s