14 - Document queue worker container in deployment README
This commit is contained in:
parent
720e4bcc1f
commit
e8a935ea31
1 changed files with 17 additions and 0 deletions
17
README.md
17
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue