diff docker/Dockerfile.db @ 9734:95496d21b4da 3.2.x

Add MapServer to Docker setup
author Tom Gottfried <tom@intevation.de>
date Fri, 22 Jul 2022 17:56:11 +0200
parents 13e2d38ad314
children 0c4736d5dd4a
line wrap: on
line diff
--- a/docker/Dockerfile.db	Fri Jul 22 13:07:07 2022 +0200
+++ b/docker/Dockerfile.db	Fri Jul 22 17:56:11 2022 +0200
@@ -1,5 +1,4 @@
-# Docker file for postgresql 9.4 on debain
-
+# Dockerfile providing a PostgreSQL database with example data for D4E River
 FROM debian:bullseye
 LABEL maintainer tom.gottfried@intevation.de
 
@@ -61,9 +60,12 @@
 RUN curl -sf "https://wald.intevation.org/frs/download.php/2282/$DATA_ARCH" | \
     tar -C $HOME --wildcards -xz 'demodaten/*.dump.sql'
 
+# Initialize database
+# Note that PostGIS legacy.sql is needed to support the outdated MapServer 6
 RUN $PGBIN/pg_ctl start -wo "--config_file=$PGCONF" && \
     /opt/d4eriver_db/postgresql-setup.sh && \
     psql -f ~/demodaten/d4e_demodata.dump.sql d4e && \
+    psql -d d4e -f /usr/share/postgresql/$PG_VERSION/contrib/postgis-3.1/legacy.sql && \
     createuser -S -D -R seddb && \
     psql -c "ALTER USER seddb WITH PASSWORD 'seddb'" && \
     createdb seddb && \

http://dive4elements.wald.intevation.org