forked from ifgi/optimetaPortal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (30 loc) · 1.07 KB
/
Dockerfile
File metadata and controls
45 lines (30 loc) · 1.07 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
42
43
44
45
ARG UBUNTU_VERSION=22.04
FROM ubuntu:${UBUNTU_VERSION}
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV OPTIMAP_DEBUG=False
ENV OPTIMAP_ALLOWED_HOST=*
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/Berlin"
# install Python and git
RUN apt-get update && \
apt-get install -y -qq python-is-python3 && \
apt-get install -y -qq python3-pip tzdata git
# install GDAL from UbuntuGIS
RUN apt-get update && \
apt-get install -y -qq software-properties-common && \
add-apt-repository ppa:ubuntugis/ppa && \
apt-get install -y -qq gdal-bin libgdal-dev
RUN pip install gdal=="$(gdal-config --version).*"
RUN mkdir -p /code
WORKDIR /code
COPY requirements.txt /tmp/requirements.txt
RUN set -ex && \
pip install --upgrade pip && \
pip install --no-cache-dir -r /tmp/requirements.txt && \
rm -rf /root/.cache/
COPY . /code
RUN chmod a+x /code/etc/manage-and-run.sh
EXPOSE 8000
#CMD ["gunicorn", "--bind", ":8000", "--workers", "2", "optimap.wsgi"]
#CMD ["python", "manage.py", "runserver", "0.0.0.0:8000" ]
ENTRYPOINT [ "/code/etc/manage-and-run.sh" ]