v_2.2
This commit is contained in:
+41
@@ -0,0 +1,41 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||
|
||||
# Build tools for libpff-python, curl for healthcheck, libjpeg for qrcode PIL
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
curl \
|
||||
libjpeg-dev \
|
||||
zlib1g-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY backend/requirements.txt /app/backend/requirements.txt
|
||||
RUN pip install --upgrade pip && \
|
||||
pip install -r /app/backend/requirements.txt
|
||||
|
||||
COPY backend /app/backend
|
||||
COPY frontend /app/frontend
|
||||
COPY admin_frontend /app/admin_frontend
|
||||
COPY entrypoint.sh /app/entrypoint.sh
|
||||
|
||||
RUN chmod +x /app/entrypoint.sh && \
|
||||
mkdir -p /app/data
|
||||
|
||||
ENV DATA_DIR=/app/data \
|
||||
FRONTEND_DIR=/app/frontend \
|
||||
ADMIN_FRONTEND_DIR=/app/admin_frontend \
|
||||
PYTHONPATH=/app/backend \
|
||||
COOKIE_SECURE=false
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
||||
CMD curl -fsS http://localhost:8000/api/health || exit 1
|
||||
|
||||
CMD ["/app/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user