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