添加prefect调度

This commit is contained in:
2026-03-26 10:52:35 +08:00
parent 2822c9b558
commit bef5c46f85
12 changed files with 753 additions and 3329 deletions
+32
View File
@@ -0,0 +1,32 @@
services:
prefect-logistics-worker:
build:
context: .
dockerfile: Dockerfile
args:
- UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
image: logistics-service-prefect:0.1.0
container_name: prefect-logistics-worker
restart: unless-stopped
env_file:
- .env
environment:
- PYTHONUNBUFFERED=1
- PREFECT_API_URL=${PREFECT_API_URL:-http://host.docker.internal:4200/api}
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- .:/app
- ./logs:/app/logs
- uv_cache:/root/.cache/uv
deploy:
resources:
limits:
cpus: "2.0"
memory: 4G
reservations:
cpus: "0.5"
memory: 512M
volumes:
uv_cache: