Commit 4ab9c4ff by imwangxiaozhou

build(docker): 新增品牌同步服务的Docker配置及更新API服务依赖

1 parent 77b13f65
FROM python:3.10-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir pysqlite3-binary
COPY . .
RUN mkdir -p data logs
ENV PYTHONPATH=/app
CMD ["python", "bin/run_brand_sync.py"]
......@@ -15,6 +15,20 @@ services:
networks:
- merchant_net
brand_sync:
build:
context: ..
dockerfile: docker/Dockerfile.brand_sync
container_name: merchant-brand-sync
volumes:
- merchant_data:/app/data
- merchant_logs:/app/logs
- ../config.ini:/app/config.ini
- ../.env:/app/.env
restart: unless-stopped
networks:
- merchant_net
api:
build:
context: ..
......@@ -30,6 +44,7 @@ services:
restart: unless-stopped
depends_on:
- sync
- brand_sync
networks:
- merchant_net
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!