services: worker: build: context: . dockerfile: docker/Dockerfile.worker env_file: - .env environment: INTERNAL_API_HOST: 0.0.0.0 volumes: - admiral_data:/app/data restart: unless-stopped labels: autoheal: "true" logging: driver: json-file options: max-size: "10m" max-file: "3" healthcheck: test: [ "CMD", "node", "-e", "fetch('http://127.0.0.1:8787/internal/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))" ] interval: 30s timeout: 10s retries: 3 start_period: 60s api: build: context: . dockerfile: docker/Dockerfile.api env_file: - .env environment: WORKER_INTERNAL_URL: http://worker:8787 depends_on: worker: condition: service_healthy restart: unless-stopped labels: autoheal: "true" healthcheck: test: [ "CMD", "node", "-e", "fetch('http://127.0.0.1:8080/livez').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))" ] interval: 30s timeout: 10s retries: 3 start_period: 60s logging: driver: json-file options: max-size: "10m" max-file: "3" # Autoheal watches containers with `autoheal: "true"` and restarts any that # become unhealthy — closing the gap that `restart: unless-stopped` alone # can't cover (a wedged-but-alive process that Docker never restarts). autoheal: image: willfarrell/autoheal@sha256:d98a2df2602512b4bee8eb8ea5a74fa2fdd7473759aef0090477be47376d490a environment: AUTOHEAL_CONTAINER_LABEL: autoheal volumes: - /var/run/docker.sock:/var/run/docker.sock restart: unless-stopped logging: driver: json-file options: max-size: "10m" max-file: "3" caddy: image: caddy:2 depends_on: - api env_file: - .env ports: - "80:80" - "443:443" volumes: - ./docker/Caddyfile:/etc/caddy/Caddyfile:ro - caddy_data:/data - caddy_config:/config restart: unless-stopped logging: driver: json-file options: max-size: "10m" max-file: "3" volumes: caddy_data: caddy_config: admiral_data: