调整docker配置
This commit is contained in:
+22
-28
@@ -3,37 +3,31 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
image: gmv-analytics-prefect:0.1.0
|
||||
container_name: prefect-gmv-worker
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
PROJECT_MAPPING_FILE: /app/店铺映射表.xlsx
|
||||
develop:
|
||||
watch:
|
||||
- action: sync+restart
|
||||
path: .
|
||||
target: /app
|
||||
ignore:
|
||||
- .git/
|
||||
- .venv/
|
||||
- __pycache__/
|
||||
- .pytest_cache/
|
||||
- logs/
|
||||
- "*.pyc"
|
||||
- "Dockerfile"
|
||||
- "docker-compose.yaml"
|
||||
- "pyproject.toml"
|
||||
- "supervisord.conf"
|
||||
- "requirements-docker.txt"
|
||||
- action: rebuild
|
||||
path: Dockerfile
|
||||
- action: rebuild
|
||||
path: docker-compose.yaml
|
||||
- action: rebuild
|
||||
path: pyproject.toml
|
||||
- action: rebuild
|
||||
path: supervisord.conf
|
||||
- action: rebuild
|
||||
path: requirements-docker.txt
|
||||
- PYTHONUNBUFFERED=1
|
||||
- PROJECT_MAPPING_FILE=/app/店铺映射表.xlsx
|
||||
- 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:
|
||||
|
||||
Reference in New Issue
Block a user