#!/bin/bash -e
echo "Running install.sh"

apt update

echo "Adding UbuntuGIS repo"
DEBIAN_FRONTEND=noninteractive apt install -y software-properties-common
add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
add-apt-repository -y ppa:schpidi2/eox
apt update

echo "Installing packages"
VERSION=1.8.0-1~bionic1eox6
DEBIAN_FRONTEND=noninteractive apt install -y \
    libmapcache1=${VERSION} libapache2-mod-mapcache=${VERSION} mapcache-tools=${VERSION} \
    sqlite3 curl apache2 python3-dateutil python3-redis wait-for-it postgresql-client

rm -rf /var/lib/apt/lists/*
