comparison 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
comparison
equal deleted inserted replaced
9733:93b9034613bc 9734:95496d21b4da
1 # Docker file for postgresql 9.4 on debain 1 # Dockerfile providing a PostgreSQL database with example data for D4E River
2
3 FROM debian:bullseye 2 FROM debian:bullseye
4 LABEL maintainer tom.gottfried@intevation.de 3 LABEL maintainer tom.gottfried@intevation.de
5 4
6 ENV PG_VERSION 13 5 ENV PG_VERSION 13
7 6
59 # Go to postgres home for write permissions 58 # Go to postgres home for write permissions
60 ENV DATA_ARCH demodaten_3.1.10-bis-3.2.x.tar.gz 59 ENV DATA_ARCH demodaten_3.1.10-bis-3.2.x.tar.gz
61 RUN curl -sf "https://wald.intevation.org/frs/download.php/2282/$DATA_ARCH" | \ 60 RUN curl -sf "https://wald.intevation.org/frs/download.php/2282/$DATA_ARCH" | \
62 tar -C $HOME --wildcards -xz 'demodaten/*.dump.sql' 61 tar -C $HOME --wildcards -xz 'demodaten/*.dump.sql'
63 62
63 # Initialize database
64 # Note that PostGIS legacy.sql is needed to support the outdated MapServer 6
64 RUN $PGBIN/pg_ctl start -wo "--config_file=$PGCONF" && \ 65 RUN $PGBIN/pg_ctl start -wo "--config_file=$PGCONF" && \
65 /opt/d4eriver_db/postgresql-setup.sh && \ 66 /opt/d4eriver_db/postgresql-setup.sh && \
66 psql -f ~/demodaten/d4e_demodata.dump.sql d4e && \ 67 psql -f ~/demodaten/d4e_demodata.dump.sql d4e && \
68 psql -d d4e -f /usr/share/postgresql/$PG_VERSION/contrib/postgis-3.1/legacy.sql && \
67 createuser -S -D -R seddb && \ 69 createuser -S -D -R seddb && \
68 psql -c "ALTER USER seddb WITH PASSWORD 'seddb'" && \ 70 psql -c "ALTER USER seddb WITH PASSWORD 'seddb'" && \
69 createdb seddb && \ 71 createdb seddb && \
70 psql -f ~/demodaten/seddb_demodata.dump.sql seddb && \ 72 psql -f ~/demodaten/seddb_demodata.dump.sql seddb && \
71 psql -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO seddb" seddb && \ 73 psql -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO seddb" seddb && \

http://dive4elements.wald.intevation.org