From e0af61c2ebe655481cbdfed7050a8bb339a5c443 Mon Sep 17 00:00:00 2001 From: DigitalLumberjack Date: Thu, 3 Mar 2016 22:17:03 +0100 Subject: [PATCH] added wiki context --- Dockerfile | 6 +++--- README.md | 1 + start.sh | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4d26968..5e732f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,9 +6,9 @@ ENV MYSQL_HOST db RUN curl http://download.forge.ow2.org/xwiki/xwiki-enterprise-web-8.0-milestone-2.war --output ${JETTY_BASE}/xwiki8.war RUN curl http://download.forge.ow2.org/xwiki/xwiki-enterprise-ui-mainwiki-all-8.0-milestone-2.xar --output ${JETTY_BASE}/xwiki8.xar -RUN unzip ${JETTY_BASE}/xwiki8.war -d ${JETTY_BASE}/webapps/ROOT/ -RUN curl http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.38/mysql-connector-java-5.1.38.jar --output ${JETTY_BASE}/webapps/ROOT/WEB-INF/lib/mysql-connector-java-5.jar +RUN unzip ${JETTY_BASE}/xwiki8.war -d ${JETTY_BASE}/webapps/${WIKI_CONTEXT}/ +RUN curl http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.38/mysql-connector-java-5.1.38.jar --output ${JETTY_BASE}/webapps/${WIKI_CONTEXT}/WEB-INF/lib/mysql-connector-java-5.jar ADD ./start.sh /usr/local/bin/start.sh -ADD ./config/hibernate.cfg.xml ${JETTY_BASE}/webapps/ROOT/WEB-INF/ +ADD ./config/hibernate.cfg.xml ${JETTY_BASE}/webapps/${WIKI_CONTEXT}/WEB-INF/ CMD ["/usr/local/bin/start.sh"] diff --git a/README.md b/README.md index e75b079..20094fa 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,4 @@ Use the following ENV when running : - MYSQL_USER : the mysql user - MYSQL_PASSWORD : the mysql password - MYSQL_HOST : the hostname of the linked database container +- WIKI_CONTEXT : the context of the website (ROOT for no context) diff --git a/start.sh b/start.sh index d845fcb..6152494 100755 --- a/start.sh +++ b/start.sh @@ -1,9 +1,9 @@ #!/bin/bash #curl http://download.forge.ow2.org/xwiki/xwiki-enterprise-web-8.0-milestone-2.war --output webapps/xwiki8.war -sed -i "s|MYSQL_HOST|${MYSQL_HOST}|" ${JETTY_BASE}/webapps/ROOT/WEB-INF/hibernate.cfg.xml -sed -i "s|MYSQL_USER|${MYSQL_USER}|" ${JETTY_BASE}/webapps/ROOT/WEB-INF/hibernate.cfg.xml -sed -i "s|MYSQL_PASSWORD|${MYSQL_PASSWORD}|" ${JETTY_BASE}/webapps/ROOT/WEB-INF/hibernate.cfg.xml +sed -i "s|MYSQL_HOST|${MYSQL_HOST}|" ${JETTY_BASE}/webapps/${WIKI_CONTEXT}/WEB-INF/hibernate.cfg.xml +sed -i "s|MYSQL_USER|${MYSQL_USER}|" ${JETTY_BASE}/webapps/${WIKI_CONTEXT}/WEB-INF/hibernate.cfg.xml +sed -i "s|MYSQL_PASSWORD|${MYSQL_PASSWORD}|" ${JETTY_BASE}/webapps/${WIKI_CONTEXT}/WEB-INF/hibernate.cfg.xml java -jar "$JETTY_HOME/start.jar"