spejstore-new/Dockerfile

19 lines
483 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
RUN python manage.py collectstatic
2023-07-14 14:29:39 +00:00
CMD bash -c "python manage.py migrate && gunicorn -b 0.0.0.0:8000 spejstore.wsgi:application"