#!/bin/bash set -e up () { # Ensure iptables rules exist # https://askubuntu.com/questions/1052919/iptables-reload-restart-on-ubuntu/1072948#1072948 docker network create --ipv6 --subnet "fd01::/80" pew-net || true # Exposed on port 8080 in pew-net docker run \ --detach \ --name geoserver \ --restart unless-stopped \ --volume /bigdata/gis/geoserver/config/geoserver-web.xml:/usr/local/geoserver/WEB-INF/web.xml:ro \ --volume /bigdata/gis/geoserver/extensions:/var/local/geoserver-exts:ro \ --volume /bigdata/gis/geoserver/data:/var/local/geoserver:rw \ --volume /bigdata/gis/store:/gis/store:ro \ --publish 8181:8080 \ --network pew-net \ docker.io/oscarfonts/geoserver:2.20.2 #--volume /bigdata/k8s-config/geoserver/config/tomcat-web.xml:/usr/local/tomcat/conf/web.xml:ro \ # Exposed on port 5432 in pew-net docker run \ --detach \ --name geoserver-postgis \ --env POSTGRES_PASSWORD=postgres \ --restart unless-stopped \ --volume /bigdata/gis/geoserver/postgis:/var/lib/postgresql/data:rw \ --network pew-net \ docker.io/postgis/postgis:14-3.2-alpine } down () { docker stop geoserver || true docker rm geoserver || true docker stop geoserver-postgis || true docker rm geoserver-postgis || true } logs () { docker logs --follow geoserver } logsp () { docker logs --follow geoserver-postgis } $@