From e8a935ea3152b4c99bb61db7b3fa6ac1c81fe7c3 Mon Sep 17 00:00:00 2001 From: myrmidex Date: Sun, 26 Apr 2026 23:54:40 +0200 Subject: [PATCH] 14 - Document queue worker container in deployment README --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 2d5a5d1..4fbbe84 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ ### Required environment ### Services you need to provide - **App**: pull `forge.lvl0.xyz/lvl0/trove:latest` (or a pinned `v*` tag). Exposes port `8000` inside the container. The image runs migrations and warms caches on boot. +- **Worker**: same image as `app`, with `command: php artisan queue:work --tries=3 --max-time=3600`. Processes the crawler queue (URL fetching, content extraction, retries). Crawls won't actually run without this — `app` only enqueues work. **Required for the crawler to function.** - **PostgreSQL 17**. Hostname must be reachable as `db` (default) or set `DB_HOST`. Persist `/var/lib/postgresql/data`. - **Redis 7** with `--appendonly yes` (queue jobs persist across restarts). Hostname `redis` or set `REDIS_HOST`. @@ -71,6 +72,22 @@ ### Example compose stack db: { condition: service_healthy } redis: { condition: service_healthy } + worker: + image: forge.lvl0.xyz/lvl0/trove:latest + restart: always + command: php artisan queue:work --tries=3 --max-time=3600 + environment: + APP_KEY: "${APP_KEY}" + APP_URL: "${APP_URL}" + DB_DATABASE: "${DB_DATABASE}" + DB_USERNAME: "${DB_USERNAME}" + DB_PASSWORD: "${DB_PASSWORD}" + volumes: + - app_storage:/app/storage + depends_on: + db: { condition: service_healthy } + redis: { condition: service_healthy } + db: image: postgres:17-alpine restart: always