-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (28 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
39 lines (28 loc) · 1.04 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
36
37
38
39
FROM python:slim
LABEL org.opencontainers.image.source="https://github.com/frousselet/cairn"
LABEL org.opencontainers.image.description="Cairn - Governance, Risk & Compliance platform"
LABEL org.opencontainers.image.licenses="MIT"
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ARG APP_VERSION=dev
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libpq-dev gettext \
libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf-2.0-0 \
libffi-dev libcairo2 libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN echo "${APP_VERSION}" > /etc/app-version
RUN python manage.py compilemessages 2>/dev/null || true
RUN python manage.py collectstatic --noinput 2>/dev/null || true
EXPOSE 8000
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["uvicorn", "core.asgi:application", \
"--host", "0.0.0.0", "--port", "8000", \
"--workers", "3", \
"--proxy-headers", \
"--forwarded-allow-ips", "*", \
"--access-log"]