forked from ivoire/Artifactorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (28 loc) · 1.13 KB
/
Copy pathDockerfile
File metadata and controls
35 lines (28 loc) · 1.13 KB
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 debian:buster-slim
LABEL maintainer="Rémi Duraffort <remi.duraffort@linaro.org>"
ENV DEBIAN_FRONTEND noninteractive
# Install dependencies
RUN apt-get update -q && \
apt-get install --no-install-recommends --yes gunicorn3 python3 python3-pip python3-yaml && \
python3 -m pip install --upgrade "django>=2.2,<=2.3" whitenoise && \
python3 -m pip install sentry-sdk && \
# Cleanup
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Create the django project
WORKDIR /app/
RUN chmod 775 /app ;\
django-admin startproject website /app
# Add entrypoint
COPY share/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
# Add sources
COPY Artifactorial/ /app/Artifactorial/
COPY share/settings.py /app/website/custom_settings.py
COPY share/urls.py /app/website/urls.py
# Setup application
RUN echo "INSTALLED_APPS.append(\"Artifactorial\")" >> /app/website/settings.py && \
echo "from Artifactorial.settings import *" >> /app/website/settings.py && \
echo "from website.custom_settings import *" >> /app/website/settings.py && \
# Migrate and collect static files
python3 manage.py collectstatic --noinput