diff --git a/Dockerfile b/Dockerfile index 253fafb..6790415 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,27 @@ -FROM python:3.9 +FROM python:3.12 # set environment variables -ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 +ENV PYTHONDONTWRITEBYTECODE 1 +ENV DJANGO_SETTINGS_MODULE core.settings + +WORKDIR /website -COPY requirements.txt . # install python dependencies +COPY requirements.txt . RUN pip install --upgrade pip 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 +# Port that the site runs on +EXPOSE 4411 + # gunicorn -CMD ["gunicorn", "--config", "gunicorn-cfg.py", "core.wsgi"] +CMD ["gunicorn", "core.wsgi:application", "--bind", "0.0.0.0:4411"] \ No newline at end of file