1 # Copyright 2020 Arctos Labs Scandinavia AB
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
18 LABEL authors="Lars-Göran Magnusson"
20 RUN apt-get --yes update \
21 && apt-get --yes install git python python-pip python3 python3-pip libmysqlclient-dev libssl-dev libffi-dev \
22 && apt-get --yes install mysql-client curl software-properties-common libgl1-mesa-glx \
23 && pip3 install pip==9.0.3
25 ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
26 ARG RELEASE=ReleaseFOUR-daily
27 ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
28 ARG REPOSITORY=testing
30 RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add -
31 RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} PLA common" && apt update
36 RUN apt-get --yes update && apt-get -y install python3-osm-common${COMMON_VERSION} python3-osm-pla${PLA_VERSION}
38 COPY scripts/ scripts/
40 ENV OSMPLA_MESSAGE_DRIVER kafka
41 ENV OSMPLA_MESSAGE_HOST kafka
42 ENV OSMPLA_MESSAGE_PORT 9092
44 ENV OSMPLA_DATABASE_DRIVER mongo
45 ENV OSMPLA_DATABASE_URI mongodb://mongo:27017
47 ENV OSMPLA_SQL_DATABASE_URI sqlite:///pla_sqlite.db
49 ENV OSMPLA_GLOBAL_LOG_LEVEL INFO
51 ENV FZNEXEC "/entry_data/fzn-exec"
52 ENV PATH "/minizinc/bin:${PATH}"
53 ENV LD_LIBRARY_PATH "/minizinc/lib:${LD_LIBRARY_PATH}"
55 # No healtcheck yet...
56 #HEALTHCHECK --start-period=120s --interval=10s --timeout=5s --retries=5 \
57 # CMD osm-pla-healthcheck || exit 1
59 CMD /bin/bash scripts/start.sh