-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
61 lines (47 loc) · 2.26 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM python:3.7.6-stretch
MAINTAINER GeoNode development team
RUN mkdir -p /usr/src/ingcmz_geonode
# Enable postgresql-client-11.2
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
# This section is borrowed from the official Django image but adds GDAL and others
RUN apt-get update && apt-get install -y \
gcc \
zip \
gettext \
postgresql-client-11 libpq-dev \
sqlite3 \
python3-gdal python3-psycopg2 \
python3-pil python3-lxml \
python3-dev libgdal-dev \
libmemcached-dev libsasl2-dev zlib1g-dev \
python3-pylibmc \
uwsgi uwsgi-plugin-python3 \
--no-install-recommends && rm -rf /var/lib/apt/lists/*
RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list
RUN apt-get update && apt-get install -y geoip-bin
# add bower and grunt command
COPY . /usr/src/ingcmz_geonode/
WORKDIR /usr/src/ingcmz_geonode
RUN apt-get update && apt-get -y install cron
COPY monitoring-cron /etc/cron.d/monitoring-cron
RUN chmod 0644 /etc/cron.d/monitoring-cron
RUN crontab /etc/cron.d/monitoring-cron
RUN touch /var/log/cron.log
RUN service cron start
COPY wait-for-databases.sh /usr/bin/wait-for-databases
RUN chmod +x /usr/bin/wait-for-databases
RUN chmod +x /usr/src/ingcmz_geonode/tasks.py \
&& chmod +x /usr/src/ingcmz_geonode/entrypoint.sh
# Upgrade pip
RUN pip install pip==20.1
# app-specific requirements
RUN pip install --upgrade --no-cache-dir --src /usr/src -r requirements.txt
RUN pip install --upgrade -e .
# Install pygdal (after requirements for numpy 1.16)
RUN pip install pygdal==$(gdal-config --version).*
# Install "geonode-contribs" apps
RUN cd /usr/src; git clone https://github.com/GeoNode/geonode-contribs.git -b master
# Install logstash and centralized dashboard dependencies
RUN cd /usr/src/geonode-contribs/geonode-logstash; pip install --upgrade -e .
ENTRYPOINT service cron restart && /usr/src/ingcmz_geonode/entrypoint.sh