feat: containerize api and worker services
This commit is contained in:
24
Dockerfile.worker
Normal file
24
Dockerfile.worker
Normal 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"]
|
||||
Reference in New Issue
Block a user