docker-compose.local.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. services:
  2. app:
  3. build:
  4. context: .
  5. target: app-runtime-local
  6. container_name: math_cms_app_local
  7. ports:
  8. - "5019:8000"
  9. env_file:
  10. - .env
  11. volumes:
  12. - ./storage:/app/storage
  13. - ./.env:/app/.env
  14. restart: unless-stopped
  15. healthcheck:
  16. test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
  17. interval: 30s
  18. timeout: 10s
  19. retries: 3
  20. start_period: 40s
  21. queue:
  22. build:
  23. context: .
  24. target: worker-local
  25. container_name: math_cms_queue_local
  26. command: php artisan queue:work --sleep=3 --tries=3 --max-time=3600
  27. env_file:
  28. - .env
  29. volumes:
  30. - ./storage:/app/storage
  31. - ./.env:/app/.env
  32. restart: unless-stopped
  33. stop_grace_period: 60s
  34. depends_on:
  35. app:
  36. condition: service_healthy
  37. healthcheck:
  38. test: ["CMD-SHELL", "pgrep -f 'queue:work' || exit 1"]
  39. interval: 30s
  40. timeout: 10s
  41. retries: 3
  42. start_period: 10s
  43. gotenberg:
  44. image: gotenberg/gotenberg:8
  45. container_name: math_cms_gotenberg_local
  46. restart: unless-stopped
  47. healthcheck:
  48. test: ["CMD-SHELL", "curl -fsS http://localhost:3000/health >/dev/null || exit 1"]
  49. interval: 30s
  50. timeout: 10s
  51. retries: 3
  52. start_period: 20s
  53. pdf-worker:
  54. build:
  55. context: .
  56. target: worker-local
  57. container_name: math_cms_pdf_local
  58. command: php artisan queue:work --queue=pdf --sleep=3 --tries=2 --max-time=300 --max-jobs=10
  59. env_file:
  60. - .env
  61. volumes:
  62. - ./storage:/app/storage
  63. - ./.env:/app/.env
  64. restart: unless-stopped
  65. stop_grace_period: 120s
  66. depends_on:
  67. app:
  68. condition: service_healthy
  69. gotenberg:
  70. condition: service_healthy
  71. healthcheck:
  72. test: ["CMD-SHELL", "pgrep -f 'queue:work' || exit 1"]
  73. interval: 30s
  74. timeout: 10s
  75. retries: 3
  76. start_period: 10s
  77. logic-worker:
  78. build:
  79. context: .
  80. target: worker-local
  81. container_name: math_cms_logic_local
  82. command: php artisan queue:work --queue=logic --sleep=1 --tries=2 --max-time=600 --max-jobs=50
  83. env_file:
  84. - .env
  85. volumes:
  86. - ./storage:/app/storage
  87. - ./.env:/app/.env
  88. restart: unless-stopped
  89. stop_grace_period: 120s
  90. depends_on:
  91. app:
  92. condition: service_healthy
  93. gotenberg:
  94. condition: service_healthy
  95. healthcheck:
  96. test: ["CMD-SHELL", "pgrep -f 'queue:work' || exit 1"]
  97. interval: 30s
  98. timeout: 10s
  99. retries: 3
  100. start_period: 10s
  101. networks:
  102. default:
  103. driver: bridge