24 lines
628 B
Docker
24 lines
628 B
Docker
FROM python:3.12-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PIP_NO_CACHE_DIR=1
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt /app/requirements.txt
|
|
RUN pip install --upgrade pip \
|
|
&& pip install -r /app/requirements.txt
|
|
|
|
COPY . /app
|
|
RUN sed -i 's/\r$//' /app/deploy/entrypoint.sh \
|
|
&& chmod +x /app/deploy/entrypoint.sh
|
|
|
|
EXPOSE 8000
|
|
|
|
ENTRYPOINT ["/app/deploy/entrypoint.sh"]
|
|
CMD ["gunicorn", "daybook_project.wsgi:application", "--bind", "0.0.0.0:8000", "--workers", "2", "--timeout", "120"]
|