spejstore-new/Dockerfile

19 lines
556 B
Docker
Raw Normal View History

2023-07-11 21:29:54 +00:00
FROM python:3.11.4-slim-bookworm
2016-09-29 20:20:10 +00:00
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
2023-07-11 21:29:54 +00:00
RUN apt-get update && apt-get install -y --no-install-recommends \
libpq-dev \
gcc \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
2016-09-29 20:20:10 +00:00
ADD requirements.txt /code/
2017-12-13 19:02:16 +00:00
RUN pip install --no-cache-dir -r requirements.txt
2016-09-29 20:20:10 +00:00
ADD . /code/
2019-05-12 13:58:19 +00:00
2023-07-11 21:29:54 +00:00
RUN python -m pip install gunicorn
2023-07-17 21:09:11 +00:00
RUN python manage.py collectstatic --no-input --clear
2023-07-17 13:47:29 +00:00
CMD bash -c "python manage.py migrate && gunicorn -b 0.0.0.0:8000 --capture-output --error-logfile - --access-logfile - spejstore.wsgi:application"