feat: containerize api and worker services

This commit is contained in:
2026-09-20 17:19:01 +03:30
parent d2109fad09
commit 85d9003e43
8 changed files with 257 additions and 52 deletions

24
Dockerfile.worker Normal file
View File

@@ -0,0 +1,24 @@
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
WORKDIR /app
COPY pyproject.toml ./
COPY src ./src
RUN pip install --upgrade pip \
&& pip install .
RUN useradd \
--create-home \
--uid 10001 \
appuser
USER appuser
EXPOSE 8001
CMD ["python", "-m", "core.worker.main"]