26 lines
588 B
Plaintext
26 lines
588 B
Plaintext
|
|
FROM python:3.12-slim
|
||
|
|
|
||
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||
|
|
build-essential \
|
||
|
|
libpq-dev \
|
||
|
|
curl \
|
||
|
|
&& rm -rf /var/lib/apt/lists/*
|
||
|
|
|
||
|
|
WORKDIR /app
|
||
|
|
|
||
|
|
COPY requirements.txt .
|
||
|
|
RUN pip install --no-cache-dir --upgrade pip
|
||
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
||
|
|
|
||
|
|
COPY . .
|
||
|
|
|
||
|
|
RUN adduser --disabled-password --gecos '' django
|
||
|
|
RUN chown -R django:django /app
|
||
|
|
USER django
|
||
|
|
|
||
|
|
RUN python manage.py collectstatic --noinput
|
||
|
|
|
||
|
|
EXPOSE 8000
|
||
|
|
|
||
|
|
CMD ["gunicorn", "booking_system.wsgi:application", "--bind", "0.0.0.0:8000", "--workers", "4", "--threads", "2"]
|