services:
  php:
    build: docker
    volumes:
      - .:/app
      - caddy_data:/data
      - caddy_config:/config
  scheduler:
    image: start-php
    pull_policy: never
    volumes:
        - .:/app
    init: true
    entrypoint: ['php', 'artisan', 'schedule:work', '-v']
    depends_on:
        - php
    restart: unless-stopped
  queue:
    image: start-php
    pull_policy: never
    volumes:
      - .:/app
    init: true
    entrypoint: ['php', 'artisan', 'queue:work', '--tries=3', '--timeout=90']
    depends_on:
      - php
    restart: unless-stopped
volumes:
  caddy_data:
  caddy_config:
