compose.healthcheck.yaml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. version: "3"
  2. services:
  3. app:
  4. healthcheck:
  5. test: 'curl --fail 127.0.0.1:8000'
  6. depends_on:
  7. phpfpm:
  8. condition: service_started
  9. phpfpm:
  10. depends_on:
  11. db:
  12. condition: service_healthy
  13. redis:
  14. condition: service_healthy
  15. elasticsearch:
  16. condition: service_healthy
  17. rabbitmq:
  18. condition: service_healthy
  19. db:
  20. healthcheck:
  21. test: 'mysqladmin ping -h localhost -u root -pmagento'
  22. interval: 5s
  23. timeout: 5s
  24. retries: 30
  25. redis:
  26. healthcheck:
  27. test: 'redis-cli ping || exit 1'
  28. interval: 5s
  29. timeout: 5s
  30. retries: 30
  31. elasticsearch:
  32. healthcheck:
  33. test: 'curl --fail elasticsearch:9200/_cat/health >/dev/null || exit 1'
  34. interval: 5s
  35. timeout: 5s
  36. retries: 30
  37. rabbitmq:
  38. healthcheck:
  39. test: 'rabbitmq-diagnostics -q ping'
  40. interval: 5s
  41. timeout: 5s
  42. retries: 30
  43. mailcatcher:
  44. healthcheck:
  45. test: 'wget --no-verbose --tries=1 --spider 127.0.0.1:1080 || exit 1'