feature/authentication_and_authorization #2
25
dockerfile
25
dockerfile
@ -1,25 +0,0 @@
|
|||||||
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"]
|
|
||||||
Loading…
Reference in New Issue
Block a user