-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile
30 lines (23 loc) · 1.01 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.7
LABEL maintainer "DataMade <[email protected]>"
# N.b., this _does not install_ dependencies required to extract text from PDFs.
RUN apt-get update && \
apt-get install -y gdal-bin && \
apt-get clean && \
rm -rf /var/cache/apt/* /var/lib/apt/lists/*
RUN mkdir /app
WORKDIR /app
COPY ./requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir --use-feature=fast-deps --use-deprecated=legacy-resolver -r requirements.txt
# Copy the contents of the current host directory (i.e., our app code) into
# the container.
COPY . /app
# Add a bogus env var for the Django secret key in order to allow us to run
# the 'collectstatic' management command
ENV DJANGO_SECRET_KEY 'foobar'
# Sets Debug to False to make sure that Django compressor can run.
# Unless overridden in docker-compose.yml or .env locally or config variables
# in Heroku, this sets the environment to production mode
ENV DJANGO_DEBUG 'False'
# Build static files into the container
RUN python manage.py collectstatic --noinput