changeset 1277:a152353eba26

fix build.sh and Dockerfile for minified app
author Michael Stanko <mstanko@bfs.de>
date Mon, 16 Jan 2017 14:32:41 +0100
parents 16fd88e8c922
children cb9609380056
files Dockerfile_mini build.sh
diffstat 2 files changed, 58 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Dockerfile_mini	Mon Jan 16 14:32:41 2017 +0100
@@ -0,0 +1,57 @@
+#
+# Build and run LADA-client (minified version)
+#
+# Build with e.g. `docker build --force-rm=true -t koala/lada_client_mini .'
+# Run from the repository root-dir with e.g.
+# `docker run --name lada_client
+#             --link lada_wildfly:lada-server
+#             -p 8180-8184:80-84 -d koala/lada_client_mini'
+#
+# The linked container may be created from the Dockerfile in the lada-server
+# repository.
+#
+# The LADA-application will be available under http://yourdockerhost:8182
+#
+# Add `-v $PWD:/var/www/html/' to the run-command if you want to
+# test your local changes (you'll have to run ./install-dependencies.sh again).
+#
+
+FROM debian:jessie
+MAINTAINER mstanko@bfs.de
+
+RUN apt-get update -y && apt-get install -y curl unzip python apache2 ruby openjdk-7-jre
+
+#
+# Install sencha cmd
+#
+RUN curl -O https://cdn.sencha.com/cmd/4.0.5.87/SenchaCmd-4.0.5.87-linux-x64.run.zip && unzip SenchaCmd-4.0.5.87-linux-x64.run.zip && chmod +x ./SenchaCmd-4.0.5.87-linux-x64.run && ./SenchaCmd-4.0.5.87-linux-x64.run --mode unattended
+ENV PATH=~/bin/Sencha/Cmd/4.0.5.87:$PATH
+ENV SENCHA_CMD_3_0_0="~/bin/Sencha/Cmd/4.0.5.87"
+
+ADD . /tmp/lada-client
+WORKDIR /tmp/lada-client
+
+#
+# Install dependencies
+#
+RUN ./install-dependencies.sh
+
+#
+# compile and minify application
+#
+ENV VERSION=2.4.1
+RUN ./build.sh
+RUN cd /var/www/html && cp -r /tmp/lada-client/lada-client-$VERSION/* .
+
+#
+# httpd setup
+#
+RUN a2enmod proxy
+RUN a2enmod proxy_http
+RUN a2enmod headers
+RUN ln -sf $PWD/custom-vhosts.conf /etc/apache2/conf-available/lada.conf
+RUN a2enconf lada
+
+EXPOSE 80 81 82 83 84
+
+CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
--- a/build.sh	Sun Jan 08 21:57:36 2017 +0100
+++ b/build.sh	Mon Jan 16 14:32:41 2017 +0100
@@ -31,7 +31,7 @@
 cp -r resources/lib/FileSaver $VERSION/resources/lib/
 cp -r resources/lib/FileSaver.js-master $VERSION/resources/lib/
 cp -r resources/lib/OpenLayers $VERSION/resources/lib/
-cp -r resources/lib/openlayers-release-2.13.1 $VERSION/resources/lib/
+cp -r resources/lib/ol2-release-2.13.1 $VERSION/resources/lib/
 
 echo "Compressing...."
 tar -czf $VERSION.tgz $VERSION

http://lada.wald.intevation.org