Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: "3.8"
- services:
- image: "node:14-alpine"
- healthcheck:
- interval: 120s
- retries: 5
- start_period: 60s
- test: |
- 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 &&
- sleep 3 &&
- rm "${PWD}/healthcheck.txt"
- cd .. &&
- sleep 3 &&
- rmdir "${PWD}/healthcheck" &&
- exit 0
- timeout: 30s
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement