47 lines
1.2 KiB
Bash
47 lines
1.2 KiB
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
up () {
|
||
|
# Exposed on port 8080 in pew-net
|
||
|
docker run \
|
||
|
--detach \
|
||
|
--name geoserver \
|
||
|
--restart unless-stopped \
|
||
|
--volume /mammoth/gis/geoserver/config/geoserver-web.xml:/usr/local/geoserver/WEB-INF/web.xml:ro \
|
||
|
--volume /mammoth/gis/geoserver/extensions:/var/local/geoserver-exts:ro \
|
||
|
--volume /mammoth/gis/geoserver/data:/var/local/geoserver:rw \
|
||
|
--volume /mammoth/gis/store:/gis/store:ro \
|
||
|
--publish 8181:8080 \
|
||
|
--network pew-net \
|
||
|
docker.io/oscarfonts/geoserver:2.20.2
|
||
|
#--volume /mammoth/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 /mammoth/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
|
||
|
}
|
||
|
|
||
|
$@
|