comparison 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
comparison
equal deleted inserted replaced
9715:278d285a16bf 9716:c3afc0274bba
6 # Necessary to run further yum-installs inside Docker container, 6 # Necessary to run further yum-installs inside Docker container,
7 # if not already part of the base image: 7 # if not already part of the base image:
8 RUN yum -y install yum-plugin-ovl 8 RUN yum -y install yum-plugin-ovl
9 9
10 # Install prerequisites 10 # Install prerequisites
11 RUN yum -y install maven mercurial 11 RUN yum -y install maven mercurial curl
12
13 # Add DEMs from demo dataset
14 ENV DEM_DIR /opt/d4e-river/dgm
15 ENV DATA_ARCH demodaten_3.1.10-bis-3.2.x.tar.gz
16 RUN mkdir -p $DEM_DIR
17 RUN curl -s "https://wald.intevation.org/frs/download.php/2282/$DATA_ARCH" | \
18 tar -C $DEM_DIR --strip-components=1 --wildcards -xz 'demodaten/dem*.grd'
19
12 20
13 WORKDIR /opt/d4e 21 WORKDIR /opt/d4e
14 ENV REPO_URL https://scm.wald.intevation.org/hg/dive4elements/ 22 ENV REPO_URL https://scm.wald.intevation.org/hg/dive4elements/
15 ENV BRANCH 3.2.x 23 ENV BRANCH 3.2.x
16 RUN hg clone -b $BRANCH $REPO_URL/framework 24 RUN hg clone -b $BRANCH $REPO_URL/framework
22 ADD . river 30 ADD . river
23 31
24 RUN mvn -q -f river/backend/pom.xml install 32 RUN mvn -q -f river/backend/pom.xml install
25 33
26 WORKDIR river/artifacts 34 WORKDIR river/artifacts
35
36 # Install WSPLGEN
37 ENV WSPLGEN_URL https://wald.intevation.org/frs/download.php/1496/wsplgen-linux-64bit-static.gz
38 RUN curl -s $WSPLGEN_URL | gunzip > bin/wsplgen && chmod +x bin/wsplgen
39
40 # Create h2 databases
27 RUN ../../framework/artifact-database/bin/createArtifacts.sh && \ 41 RUN ../../framework/artifact-database/bin/createArtifacts.sh && \
28 mv artifactsdb doc/ 42 mv artifactsdb doc/
29 RUN ./bin/createDatacage.sh && \ 43 RUN ./bin/createDatacage.sh && \
30 mv datacagedb doc/ 44 mv datacagedb doc/
31 45
32 EXPOSE 8181 46 EXPOSE 8181
33 47
34 CMD mvn -Dexec.mainClass=org.dive4elements.artifactdatabase.App \ 48 CMD mvn -Dexec.mainClass=org.dive4elements.artifactdatabase.App \
35 -Dartifact.database.dir="/opt/d4e/river/artifacts/doc/conf" \ 49 -Dartifact.database.dir="/opt/d4e/river/artifacts/doc/conf" \
50 -Dwsplgen.bin.path="/opt/d4e/river/artifacts/bin/wsplgen" \
36 compile exec:java 51 compile exec:java

http://dive4elements.wald.intevation.org