diff docker/Dockerfile.artifacts @ 9716:c3afc0274bba 3.2.x

Improve Docker-based development setup _ Add demo DEMs and WSPLGEN to artifact server _ Do not unpack unused large DEM files into database image _ Improve README
author Tom Gottfried <tom@intevation.de>
date Mon, 22 Mar 2021 17:35:30 +0100
parents 278d285a16bf
children 13e2d38ad314
line wrap: on
line diff
--- a/docker/Dockerfile.artifacts	Mon Mar 22 14:45:36 2021 +0100
+++ b/docker/Dockerfile.artifacts	Mon Mar 22 17:35:30 2021 +0100
@@ -8,7 +8,15 @@
 RUN yum -y install yum-plugin-ovl
 
 # Install prerequisites
-RUN yum -y install maven mercurial
+RUN yum -y install maven mercurial curl
+
+# Add DEMs from demo dataset
+ENV DEM_DIR /opt/d4e-river/dgm
+ENV DATA_ARCH demodaten_3.1.10-bis-3.2.x.tar.gz
+RUN mkdir -p $DEM_DIR
+RUN curl -s "https://wald.intevation.org/frs/download.php/2282/$DATA_ARCH" | \
+    tar -C $DEM_DIR --strip-components=1 --wildcards -xz 'demodaten/dem*.grd'
+
 
 WORKDIR /opt/d4e
 ENV REPO_URL https://scm.wald.intevation.org/hg/dive4elements/
@@ -24,6 +32,12 @@
 RUN mvn -q -f river/backend/pom.xml install
 
 WORKDIR river/artifacts
+
+# Install WSPLGEN
+ENV WSPLGEN_URL https://wald.intevation.org/frs/download.php/1496/wsplgen-linux-64bit-static.gz
+RUN curl -s $WSPLGEN_URL | gunzip > bin/wsplgen && chmod +x bin/wsplgen
+
+# Create h2 databases
 RUN ../../framework/artifact-database/bin/createArtifacts.sh && \
     mv artifactsdb doc/
 RUN ./bin/createDatacage.sh && \
@@ -33,4 +47,5 @@
 
 CMD mvn -Dexec.mainClass=org.dive4elements.artifactdatabase.App \
         -Dartifact.database.dir="/opt/d4e/river/artifacts/doc/conf" \
+        -Dwsplgen.bin.path="/opt/d4e/river/artifacts/bin/wsplgen" \
         compile exec:java

http://dive4elements.wald.intevation.org