blechreiz-website/Dockerfile

25 lines
642 B
Docker

# docker build -t "blechreiz_website" .
FROM ubuntu:20.04
RUN apt-get update \
&& apt-get install -y python3 python3-venv python3-wheel \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ADD . /blechreiz
ENV BLECHREIZ_DATA /data
ENV PYTHONUNBUFFERED 1
ENV PYTHONPATH /blechreiz
RUN cd /blechreiz \
&& python3 -m venv env \
&& . /blechreiz/env/bin/activate \
&& rm -r /blechreiz/blechreiz/data \
&& /blechreiz/env/bin/pip install -r requirements.txt
EXPOSE 8000
CMD /blechreiz/env/bin/python3 /blechreiz/manage.py collectstatic --noinput \
&& /blechreiz/env/bin/gunicorn -b 0.0.0.0:8000 blechreiz.wsgi