-
Notifications
You must be signed in to change notification settings - Fork 19
/
Dockerfile
60 lines (47 loc) · 1.44 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
FROM ubuntu:22.04
ENV INSTANCE_NAME=instance
ENV TZ=UTC
ENV PYTHONPATH='/opt/eoxserver'
ENV PYTHONUNBUFFERED="1"
# possible values are "postgis" and "spatialite"
ENV DB=spatialite
ENV DB_HOST ''
ENV DB_NAME ''
ENV DB_USER ''
ENV DB_PW ''
# set these variables to add a django user upon instance initialization
ENV DJANGO_USER ''
ENV DJANGO_MAIL ''
ENV DJANGO_PASSWORD ''
# set this to a glob or filename in order to run after initialization
ENV INIT_SCRIPTS=''
# override this or specify additional options in the config file
ENV GUNICORN_CMD_ARGS "--config /opt/eoxserver/gunicorn.conf.py ${INSTANCE_NAME}.wsgi:application"
# install OS dependency packages
RUN apt-get update \
&& apt-get install -y \
python3 \
python3-pip \
libpq-dev \
python3-gdal \
python3-mapscript \
gdal-bin \
libsqlite3-mod-spatialite \
postgresql-client \
python3-psycopg2 \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/partial/* /tmp/* /var/tmp/*
ENV PROMETHEUS_MULTIPROC_DIR /var/tmp/prometheus_multiproc_dir
RUN mkdir $PROMETHEUS_MULTIPROC_DIR # make sure this is writable by webserver user
RUN mkdir /opt/eoxserver/
WORKDIR /opt/eoxserver
# install dependencies
COPY requirements.txt .
RUN python3 -m pip install -U pip \
&& python3 -m pip install --no-cache-dir -r requirements.txt
# install EOxServer
COPY . .
EXPOSE 8000
ENTRYPOINT ["/opt/eoxserver/entrypoint.sh"]
CMD "gunicorn" $GUNICORN_CMD_ARGS