forked from City-of-Helsinki/structured-log-transfer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (28 loc) · 947 Bytes
/
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
31
32
33
34
35
# ==============================
FROM helsinkitest/python:3.8-slim as appbase
# ==============================
RUN mkdir /entrypoint
COPY requirements.in .
RUN apt-install.sh \
git \
netcat \
libpq-dev \
build-essential \
gettext \
libmariadb-dev \
&& pip install -U pip \
&& pip install pip-tools \
&& pip install mysqlclient \
&& pip-compile requirements.in \
&& pip uninstall -y pip-tools \
&& pip install -r /app/requirements.txt \
&& pip cache purge \
&& pip uninstall -y pip \
&& apt-cleanup.sh build-essential
COPY . .
RUN SECRET_KEY="only-used-for-collectstatic" python manage.py collectstatic
# Uncomment this, if utility gets translated messages
#RUN ./manage.py compilemessages
ADD --chown=appuser:appuser https://www.digicert.com/CACerts/BaltimoreCyberTrustRoot.crt.pem certs/
#CMD ["echo", "Only run from cronjobs"]
ENTRYPOINT ["./manage.py"]