-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (22 loc) · 817 Bytes
/
Dockerfile
File metadata and controls
27 lines (22 loc) · 817 Bytes
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
FROM docker.io/debian:buster-slim
RUN apt update
RUN apt install -y --no-install-recommends pipenv uwsgi uwsgi-plugin-python3 python3-psycopg2 python3-setuptools
# install project dependencies and add sources
ADD Pipfile Pipfile.lock /app/src/
WORKDIR /app/src
RUN pipenv install --system --deploy --ignore-pipfile
ADD . /app/src/
# put configuration in correct places
RUN mkdir -p /app/config
RUN cp /app/src/tileservermapping/settings.py.example /app/config/settings.py
RUN ln -sf /app/config/settings.py /app/src/tileservermapping/settings.py
RUN ln -s /app/src/docker/uwsgi.ini /etc/uwsgi/tileservermapping.ini
# collect staticfiles
RUN ./manage.py collectstatic --no-input
# container metadata
CMD uwsgi /etc/uwsgi/tileservermapping.ini
ENV LANG='en_US.UTF-8'
# http
EXPOSE 8000/tcp
# uwsgi
EXPOSE 3003/tcp