17 lines
443 B
Docker
17 lines
443 B
Docker
# Shared image for the worker roles (refactor §1). Built from backend/.
|
|||
|
|
FROM python:3.11-slim
|
||
|
|
|
||
|
|
WORKDIR /app
|
||
|
|
|
||
|
|
# Install deps first for layer caching.
|
||
|
|
COPY pyproject.toml ./
|
||
|
|
COPY app ./app
|
||
|
|
COPY workers ./workers
|
||
|
|
COPY migrations ./migrations
|
||
|
|
COPY alembic.ini ./alembic.ini
|
||
|
|
RUN pip install --no-cache-dir .
|
||
|
|
|
||
|
|
# Default to the combined role; docker-compose overrides WORKER_ROLE per service.
|
||
|
|
ENV WORKER_ROLE=all
|
||
|
|
CMD ["python", "-m", "workers.run"]
|