Skip to content

Commit 32f6923

Browse files
[MISC] Add worker-metrics service to compose override templates (#1841)
* [MISC] Add worker-metrics service to compose override templates Add worker-metrics celery service for dashboard metrics processing to both compose override files. Service builds from backend Dockerfile with reduced autoscale (2,1) for lightweight local development and includes file watch configuration for backend/ and unstract/ directories for hot-reload during development. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * [MISC] Fix worker-metrics override: use command override and sync+restart - Replace environment var with explicit command override since Compose resolves ${WORKER_METRICS_AUTOSCALE:-4,1} at compose-time from host env - Change sync to sync+restart so Celery picks up code changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0d93ee2 commit 32f6923

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

docker/sample.compose.override.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,24 @@ services:
319319
- action: rebuild
320320
path: ../workers/uv.lock
321321

322+
#########################################################################################################
323+
# Celery worker for dashboard metrics (memory optimized: reduced autoscale)
324+
worker-metrics:
325+
build:
326+
dockerfile: docker/dockerfiles/backend.Dockerfile
327+
context: ..
328+
command: "-A backend worker --loglevel=info -Q dashboard_metric_events --autoscale=2,1"
329+
develop:
330+
watch:
331+
- action: sync+restart
332+
path: ../backend/
333+
target: /app
334+
ignore: [.venv/, __pycache__/, "*.pyc", .pytest_cache/, .mypy_cache/]
335+
- action: sync+restart
336+
path: ../unstract/
337+
target: /unstract
338+
ignore: [.venv/, __pycache__/, "*.pyc", .pytest_cache/, .mypy_cache/]
339+
322340
# V1 workers disabled by default (use workers-v2 profile instead)
323341
worker:
324342
profiles:

0 commit comments

Comments
 (0)