forked from Gulianrdgd/Bussen--online-drinking-game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (23 loc) · 1.03 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM python:3.8
MAINTAINER Lars van Rhijn
ENV PYTHONUNBUFFERED 1
ENV DJANGO_SETTINGS_MODULE games.settings.production
ENV PATH /root/.poetry/bin:${PATH}
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
WORKDIR /games/src
COPY resources/entrypoint.sh /usr/local/bin/entrypoint.sh
COPY poetry.lock pyproject.toml /games/src/
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends postgresql-client cron && \
rm --recursive --force /var/lib/apt/lists/* && \
\
mkdir --parents /games/src/ && \
mkdir --parents /games/log/ && \
mkdir --parents /games/static/ && \
chmod +x /usr/local/bin/entrypoint.sh && \
\
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python && \
poetry config --no-interaction --no-ansi virtualenvs.create false && \
poetry install --no-interaction --no-ansi --no-dev
COPY website /games/src/website/
RUN echo "0 0 * * * www-data /games/src/website/manage.py dataminimisation" >> /etc/crontab