Dev backend reloads on worker edits too: fastapi dev with --reload-dir over backend and worker, worker in develop.watch

This commit is contained in:
2026-10-14 23:34:07 +02:00
parent 245e68449f
commit ef9d9824bb
2 changed files with 17 additions and 5 deletions
+13 -2
View File
@@ -92,10 +92,18 @@ services:
build:
context: ..
dockerfile: backend/Dockerfile
# `fastapi dev`, because `run` takes no `--reload-dir`. Watching the worker
# too makes a worker edit restart the engine, which respawns the local
# worker pool with the new code.
command:
- fastapi
- run
- --reload
- dev
- --host
- 0.0.0.0
- --reload-dir
- /app/backend
- --reload-dir
- /app/worker
- "fluksio/main.py"
develop:
watch:
@@ -107,6 +115,9 @@ services:
- .venv
- path: ../backend/pyproject.toml
action: rebuild
- path: ../worker/fluksio_worker
action: sync
target: /app/worker/fluksio_worker
volumes:
# What makes --reload above mean anything in the detached flow (`make dev`,
# `make dev-local`): it starts the stack with `up -d`, which never runs the