Changes committed
This commit is contained in:
39
docengine/Dockerfile
Normal file
39
docengine/Dockerfile
Normal file
@@ -0,0 +1,39 @@
|
||||
FROM python:3.12-slim AS base
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
libpq-dev \
|
||||
libgl1-mesa-glx \
|
||||
libglib2.0-0 \
|
||||
libsm6 \
|
||||
libxext6 \
|
||||
libxrender-dev \
|
||||
libgomp1 \
|
||||
poppler-utils \
|
||||
ghostscript \
|
||||
libmagic1 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN mkdir -p /app/storage/documents /app/storage/templates /app/storage/images /app/storage/temp
|
||||
|
||||
FROM base AS app
|
||||
EXPOSE 7989
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7989", "--workers", "4"]
|
||||
|
||||
FROM base AS worker
|
||||
CMD ["celery", "-A", "app.workers.celery_app", "worker", "--loglevel=info", "--concurrency=4"]
|
||||
|
||||
FROM base AS beat
|
||||
CMD ["celery", "-A", "app.workers.celery_app", "beat", "--loglevel=info"]
|
||||
Reference in New Issue
Block a user