docker-compose.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. x-app: &app
  2. build:
  3. dockerfile: .docker/php/Dockerfile
  4. context: ./
  5. target: development
  6. user: "${APP_UID:-1000}:${APP_GID:-1000}"
  7. environment:
  8. XDG_CONFIG_HOME: /app/caddy/config
  9. XDG_DATA_HOME: /app/caddy/data
  10. volumes:
  11. - ${LOCAL_WORKSPACE_FOLDER:-./}:/app:cached
  12. services:
  13. application:
  14. <<: *app
  15. command: php /app/artisan octane:start --watch --caddyfile=Caddyfile --server=frankenphp --admin-port=9019 --host=0.0.0.0 --port=9000 --workers=1 --max-requests=1
  16. healthcheck:
  17. test: php artisan octane:status
  18. interval: 2s
  19. timeout: 5s
  20. start_period: 5s
  21. retries: 8
  22. horizon:
  23. <<: *app
  24. command: php /app/artisan horizon
  25. healthcheck:
  26. test: php artisan horizon:status
  27. interval: 2s
  28. timeout: 5s
  29. start_period: 2s
  30. reverb:
  31. <<: *app
  32. command: php /app/artisan reverb:start --host=0.0.0.0 --port=8080
  33. healthcheck:
  34. test: [ "CMD", "sh", "-c", "pgrep -f 'reverb:start' > /dev/null || exit 1" ]
  35. interval: 2s
  36. timeout: 5s
  37. start_period: 2s
  38. vite:
  39. <<: *app
  40. command: npm run dev -- --host
  41. healthcheck:
  42. test: [ "CMD", "sh", "-c", "pgrep -f 'npm run dev' > /dev/null || exit 1" ]
  43. interval: 2s
  44. timeout: 5s
  45. start_period: 2s
  46. development:
  47. <<: *app
  48. restart: no