-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (34 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
41 lines (34 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
40
41
FROM python:3.8.1-buster
ENV PYTHONUNBUFFERED 1
# provide dummy values for required env variables
ENV CWWED_ARCHIVES_ACCESS_KEY_ID ''
ENV CWWED_ARCHIVES_SECRET_ACCESS_KEY ''
ENV SLACK_BOT_TOKEN ''
# include app
RUN mkdir /app
ADD . /app
ADD docker-entrypoint.sh /app
WORKDIR /app
RUN echo "Installing dependencies and building application" \
&& wget -qO- https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get update && apt-get install -y \
libgdal-dev \
gdal-bin \
nodejs \
python3-tk \
libudunits2-dev \
&& pip install --upgrade pip \
&& pip install -r requirements.txt \
&& npm --prefix frontend install \
&& npm --prefix frontend run build-prod \
&& mkdir -p staticfiles && python manage.py collectstatic --no-input \
&& apt-get remove -y \
libgdal-dev \
nodejs \
&& apt-get autoremove -y \
&& rm -rf frontend/node_modules \
&& rm -rf /var/lib/apt/lists/* \
&& true
EXPOSE 80
VOLUME /media/bucket/cwwed
ENTRYPOINT ["/app/docker-entrypoint.sh"]