PYRSS-Website/Dockerfile
Corban-Lee Jones a276aa3ccb
All checks were successful
Build and Push Docker Image / build (push) Successful in 17s
collectstatic to dockerfile
2024-08-11 22:52:50 +01:00

24 lines
451 B
Docker

FROM python:3.11
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
WORKDIR /app
# install python dependencies
COPY requirements.txt /app/
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
COPY . /app/
# running migrations
RUN python manage.py migrate
# collect static
RUN python manage.py collectstatic
# gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "core.wsgi:application"]