| Mike Marchetti | 13d76c8 | 2018-09-19 15:00:36 -0400 | [diff] [blame] | 1 | # Copyright 2018 Whitestack, LLC |
| 2 | # ************************************************************* |
| 3 | |
| 4 | # This file is part of OSM Monitoring module |
| 5 | # All Rights Reserved to Whitestack, LLC |
| 6 | |
| 7 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 8 | # not use this file except in compliance with the License. You may obtain |
| 9 | # a copy of the License at |
| 10 | |
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | |
| 13 | # Unless required by applicable law or agreed to in writing, software |
| 14 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 15 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 16 | # License for the specific language governing permissions and limitations |
| 17 | # under the License. |
| 18 | |
| 19 | # For those usages not covered by the Apache License, Version 2.0 please |
| 20 | # contact: bdiaz@whitestack.com or glavado@whitestack.com |
| 21 | ## |
| 22 | |
| palsus | ea93a25 | 2021-02-25 20:16:19 +0000 | [diff] [blame^] | 23 | FROM ubuntu:20.04 |
| Mike Marchetti | 13d76c8 | 2018-09-19 15:00:36 -0400 | [diff] [blame] | 24 | |
| 25 | LABEL authors="Benjamín Díaz" |
| 26 | |
| palsus | ea93a25 | 2021-02-25 20:16:19 +0000 | [diff] [blame^] | 27 | RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \ |
| 28 | && DEBIAN_FRONTEND=noninteractive apt-get -y install \ |
| 29 | git python3 python3-pip libmysqlclient-dev libssl-dev libffi-dev \ |
| 30 | mysql-client curl software-properties-common |
| 31 | |
| 32 | RUN pip3 install pip==21.0.1 |
| Mike Marchetti | 13d76c8 | 2018-09-19 15:00:36 -0400 | [diff] [blame] | 33 | |
| Mike Marchetti | dc8ea9c | 2018-09-21 11:36:05 -0400 | [diff] [blame] | 34 | ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian |
| garciadeblas | fa81f28 | 2020-12-15 00:32:13 +0000 | [diff] [blame] | 35 | ARG RELEASE=ReleaseNINE-daily |
| Mike Marchetti | dc8ea9c | 2018-09-21 11:36:05 -0400 | [diff] [blame] | 36 | ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg |
| 37 | ARG REPOSITORY=testing |
| Mike Marchetti | 13d76c8 | 2018-09-19 15:00:36 -0400 | [diff] [blame] | 38 | |
| Mike Marchetti | dc8ea9c | 2018-09-21 11:36:05 -0400 | [diff] [blame] | 39 | RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add - |
| 40 | RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} POL common" && apt update |
| 41 | |
| 42 | ARG POL_VERSION |
| 43 | ARG COMMON_VERSION |
| 44 | |
| palsus | ea93a25 | 2021-02-25 20:16:19 +0000 | [diff] [blame^] | 45 | RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \ |
| 46 | && DEBIAN_FRONTEND=noninteractive apt-get -y install python3-osm-policy-module${POL_VERSION} |
| Mike Marchetti | dc8ea9c | 2018-09-21 11:36:05 -0400 | [diff] [blame] | 47 | |
| Benjamin Diaz | 0456088 | 2019-02-26 17:25:07 -0300 | [diff] [blame] | 48 | COPY scripts/ scripts/ |
| 49 | |
| Eduardo Sousa | 280ccc7 | 2018-09-21 16:34:29 +0100 | [diff] [blame] | 50 | ENV OSMPOL_MESSAGE_DRIVER kafka |
| 51 | ENV OSMPOL_MESSAGE_HOST kafka |
| 52 | ENV OSMPOL_MESSAGE_PORT 9092 |
| 53 | |
| 54 | ENV OSMPOL_DATABASE_DRIVER mongo |
| Juan | cc084d7 | 2018-11-16 11:08:07 -0300 | [diff] [blame] | 55 | ENV OSMPOL_DATABASE_URI mongodb://mongo:27017 |
| Eduardo Sousa | 280ccc7 | 2018-09-21 16:34:29 +0100 | [diff] [blame] | 56 | |
| 57 | ENV OSMPOL_SQL_DATABASE_URI sqlite:///mon_sqlite.db |
| 58 | |
| Benjamin Diaz | e6f7b45 | 2019-02-07 12:09:57 -0300 | [diff] [blame] | 59 | ENV OSMPOL_GLOBAL_LOG_LEVEL INFO |
| Eduardo Sousa | 280ccc7 | 2018-09-21 16:34:29 +0100 | [diff] [blame] | 60 | |
| tierno | 836e9db | 2019-07-22 13:23:56 +0000 | [diff] [blame] | 61 | HEALTHCHECK --start-period=120s --interval=10s --timeout=5s --retries=5 \ |
| Benjamin Diaz | deb99f3 | 2019-05-27 17:01:06 -0300 | [diff] [blame] | 62 | CMD osm-pol-healthcheck || exit 1 |
| 63 | |
| Benjamin Diaz | 0456088 | 2019-02-26 17:25:07 -0300 | [diff] [blame] | 64 | CMD /bin/bash scripts/start.sh |