Answers for "healthcheck docker compose"

2

docker compose healthcheck

healthcheck:
      start_period: 60ms
      retries: 3
      timeout: 15s
      interval: 30s
      test:
        sleep 5 &&
        touch /tmp/healthcheck.txt &&
        mkdir /tmp/healthcheck &&
        mv /tmp/healthcheck.txt /tmp/healthcheck &&
        cd /tmp/healthcheck &&
        echo "hello my docker container is working fine" >> healthcheck.txt &&
        cat healthcheck.txt &&
        chmod 777 /tmp/healthcheck &&
        rm healthcheck.txt &&
        cd .. &&
        rmdir /tmp/healthcheck &&
        clear &&
        exit
Posted by: Guest on May-30-2021
0

healthcheck docker compose

healthcheck:
  test: ["CMD", "curl", "-f", "http://localhost"]
  interval: 1m30s
  timeout: 10s
  retries: 3
  start_period: 40s
Posted by: Guest on November-25-2020

Browse Popular Code Answers by Language