-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (27 loc) · 882 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
FROM python:3-slim AS base
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends python3-gdal libsqlite3-mod-spatialite python3-dev build-essential sqlite3 yarnpkg && \
apt-get autoremove --purge -y
RUN pip install --upgrade pip
RUN mkdir /app
RUN mkdir /cache
WORKDIR /app
COPY requirements.txt package.json yarn.lock /app/
RUN pip install -r requirements.txt
RUN yarnpkg install
CMD ["python", "manage.py", "runserver", "0.0.0.0:80"]
ARG BUILD_VERSION=dev
ENV BUILD_VERSION=$BUILD_VERSION
ARG GIT_REV=HEAD
ENV GIT_REV=$GIT_REV
FROM base AS prod
ARG DEBUG False
ARG SENTRY_DSN=https://[email protected]/1
COPY . /app/
RUN python manage.py collectstatic --no-input
RUN python manage.py compress
CMD ["bash", "/app/entrypoint.sh"]