-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
37 lines (28 loc) · 918 Bytes
/
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
FROM ubuntu:16.04
MAINTAINER Grant Heffernan <[email protected]>
# env
ENV DEBIAN_FRONTEND noninteractive
ENV API_BIND_ADDR ${STORE_BIND_ADDR:-"0.0.0.0"}
ENV API_LISTEN_PORT ${STORE_LISTEN_PORT:-"8004"}
ENV POSTGRES_USER ${POSTGRES_USER:-"opentraffic"}
ENV POSTGRES_PASSWORD ${POSTGRES_PASSWORD:-"changeme"}
ENV POSTGRES_DB ${POSTGRES_DB:-"opentraffic"}
ENV POSTGRES_HOST ${POSTGRES_HOST:-"postgres"}
ENV POSTGRES_PORT ${POSTGRES_PORT:-"5432"}
ENV TILE_DIR ${TILE_DIR:-"/data/tiles"}
# install dependencies
RUN apt-get update && apt-get install -y \
python \
python-pip \
python-psycopg2 \
python-rtree \
python-shapely
RUN pip install bitstring
# install code
ADD ./py /api
# cleanup
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EXPOSE ${API_LISTEN_PORT}
# start the datastore service
CMD python -u /api/query.py ${API_BIND_ADDR}:${API_LISTEN_PORT}