Update Dockerfile
This commit is contained in:
parent
75531f872b
commit
92c6cda583
21
Dockerfile
21
Dockerfile
@ -1,18 +1,27 @@
|
|||||||
FROM python:3.9
|
FROM python:3.12
|
||||||
|
|
||||||
# set environment variables
|
# set environment variables
|
||||||
ENV PYTHONDONTWRITEBYTECODE 1
|
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
|
ENV PYTHONDONTWRITEBYTECODE 1
|
||||||
|
ENV DJANGO_SETTINGS_MODULE core.settings
|
||||||
|
|
||||||
|
WORKDIR /website
|
||||||
|
|
||||||
COPY requirements.txt .
|
|
||||||
# install python dependencies
|
# install python dependencies
|
||||||
|
COPY requirements.txt .
|
||||||
RUN pip install --upgrade pip
|
RUN pip install --upgrade pip
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
COPY . .
|
COPY . /website/
|
||||||
|
|
||||||
# running migrations
|
# collect static files
|
||||||
|
RUN python manage.py collectstatic --noinput
|
||||||
|
|
||||||
|
# run migrations
|
||||||
RUN python manage.py migrate
|
RUN python manage.py migrate
|
||||||
|
|
||||||
|
# Port that the site runs on
|
||||||
|
EXPOSE 4411
|
||||||
|
|
||||||
# gunicorn
|
# gunicorn
|
||||||
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "core.wsgi"]
|
CMD ["gunicorn", "core.wsgi:application", "--bind", "0.0.0.0:4411"]
|
Loading…
x
Reference in New Issue
Block a user