Commit 14226b0b authored by Guillaume Mella's avatar Guillaume Mella

move to existdb 5.0

parent b1ef1ee8
IMAGE_TAG=1.3-alpha
SVN_TAG=OIDB_V1_3-alpha
SVN_REV=2867
IMAGE_TAG=1.4-alpha
#SVN_TAG help to find tagged code or trunk ( path part of svn repo )
SVN_TAG=trunk
#SVN_TAG=tag/OIDB_V1_3-alpha
OIDB_JAVA_XMS=1G
OIDB_JAVA_XMX=2G
#CLASSPATH=/exist/lib/extensions/exist-security-jmmc.jar:/exist/lib/exist.uber.jar:/exist/lib/user/commons-logging-1.1.3.jar:/exist/lib/user/commons-dbcp2-2.0.1.jar:/exist/lib/user/taplib-1.1b.jar:/exist/lib/user/commons-pool2-2.2.jar:/exist/lib/user/postgresql-42.1.1.jre7.jar:/exist/lib/user/exist-security-jmmc.jar:/exist/lib/user/oidb-tap-TRUNK.jar:/exist/lib/user/jmmc-realm-TRUNK-sources.jar:/exist/lib/user/oidb-tap-TRUNK-sources.jar
# see Dockerfile workarround
CLASSPATH=/exist/lib/extensions/exist-security-jmmc.jar:/exist/lib/exist.uber.jar:/exist/lib/user/commons-logging-1.1.3.jar:/exist/lib/user/commons-dbcp2-2.7.0.jar:/exist/lib/user/taplib-1.1b.jar:/exist/lib/user/commons-pool2-2.7.0.jar:/exist/lib/user/postgresql-42.2.8.jar:/exist/lib/user/exist-security-jmmc.jar:/exist/lib/user/oidb-tap-TRUNK.jar:/exist/lib/user/jmmc-realm-TRUNK-sources.jar:/exist/lib/user/oidb-tap-TRUNK-sources.jar:/exist/lib/user/jmal-TRUNK.jar:/exist/lib/user/oitools-TRUNK.jar:/exist/lib/user/oiexplorer-existdb-TRUNK.jar
......@@ -31,12 +31,14 @@ services:
context: oidb-existdb
args:
SVN_TAG: ${SVN_TAG}
SVN_REV: ${SVN_REV}
OIDB_JAVA_XMS: ${OIDB_JAVA_XMS}
OIDB_JAVA_XMX: ${OIDB_JAVA_XMX}
environment:
- CLASSPATH=${CLASSPATH}
image: oidb-existdb:${IMAGE_TAG}
volumes:
- oidb-existdb-data:/exist/webapp/WEB-INF/data/
# - ./log4j2.xml:/exist/etc/log4j2.xml
# uncomment to save logs - oidb-existdb-logs:/exist/webapp/WEB-INF/logs/
ports:
- "8080:8080"
......@@ -54,7 +56,6 @@ services:
- oidb-postgres-data:/var/lib/postgresql/
networks:
- oidb
tty: true
volumes:
# Don't forget to use named volumes if you may run docker-compose up from various directory names
......
FROM openjdk:8-jdk-slim as builder
ARG SVN_TAG
ARG SVN_REV
ENV MVN mvn -Dassembly.skipAssembly -Djarsigner.skip=true -Dmaven.javadoc.skip=true -Dmaven.test.skip=true
......@@ -21,13 +20,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
WORKDIR /tmp
#RUN svn export https://svn.jmmc.fr/jmmc-web/tags/$SVN_TAG/exist/
RUN svn export -r$SVN_REV https://svn.jmmc.fr/jmmc-web/trunk/exist/
RUN svn export https://svn.jmmc.fr/jmmc-web/$SVN_TAG/exist/
WORKDIR /tmp/exist
RUN svn export https://svn.jmmc.fr/jmmc-sw/MCS/tags/$SVN_TAG/jmcs build/deps/jmcs &&\
svn export https://svn.jmmc.fr/jmmc-sw/MCS/tags/$SVN_TAG/jmal build/deps/jmal &&\
svn export https://svn.jmmc.fr/jmmc-sw/oiTools/tags/$SVN_TAG/ build/deps/oiTools &&\
RUN svn export https://svn.jmmc.fr/jmmc-sw/MCS/$SVN_TAG/jmcs build/deps/jmcs &&\
svn export https://svn.jmmc.fr/jmmc-sw/MCS/$SVN_TAG/jmal build/deps/jmal &&\
svn export https://svn.jmmc.fr/jmmc-sw/oiTools/$SVN_TAG/ build/deps/oiTools &&\
git clone https://github.com/JMMC-OpenDev/OITools.git build/deps/oitools &&\
rm -rf build/deps/oiTools/oitools &&\
mv build/deps/oitools build/deps/oiTools
......@@ -44,24 +42,30 @@ RUN sed -i -e '/^assistive_technologies=/s/^/#/' /etc/java-*-openjdk/accessibili
RUN $MVN install &&\
ant
FROM existdb/existdb:5.0.0
FROM existdb/existdb:4.7.0
ARG OIDB_JAVA_XMX
ARG OIDB_JAVA_XMS
ENV JAVA_TOOL_OPTIONS -Dfile.encoding=UTF8 -Dsun.jnu.encoding=UTF-8 -Djava.awt.headless=true -Dorg.exist.db-connection.cacheSize=256M -Dorg.exist.db-connection.pool.max=20 -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseG1GC -XX:+UseStringDeduplication -Xms$OIDB_JAVA_XMS -Xmx$OIDB_JAVA_XMX
ENV JAVA_TOOL_OPTIONS -Dfile.encoding=UTF8 -Dsun.jnu.encoding=UTF-8 -Djava.awt.headless=true -Dorg.exist.db-connection.cacheSize=256M -Dorg.exist.db-connection.pool.max=20 -Dlog4j.configurationFile=/exist/etc/log4j2.xml -Dexist.home=/exist -Dexist.configurationFile=/exist/etc/conf.xml -Djetty.home=/exist -Dexist.jetty.config=/exist/etc/jetty/standard.enabled-jetty-configs -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseG1GC -XX:+UseStringDeduplication -Xms$OIDB_JAVA_XMS -Xmx$OIDB_JAVA_XMX
COPY --from=builder /tmp/exist/build/*.jar $EXIST_HOME/lib/user/
COPY --from=builder /tmp/exist/build/exist-security-jmmc.jar $EXIST_HOME/lib/extensions/
ADD http://exist-db.org/exist/apps/public-repo/public/expath-ft-client-exist-lib-1.1.6.xar $EXIST_HOME/autodeploy/
#ADD http://exist-db.org/exist/apps/public-repo/public/expath-ft-client-exist-lib-1.1.6.xar $EXIST_HOME/autodeploy/
COPY --from=builder /tmp/exist/build/jmmc-realm-*.xar /tmp/exist/build/jmmc-resources-*.xar $EXIST_HOME/autodeploy/
COPY --from=builder /tmp/exist/build/oidb-data*.xar $EXIST_HOME/autodeploy/
COPY --from=builder /tmp/exist/build/oidb-1.*.xar $EXIST_HOME/autodeploy/zz_oidb.xar
COPY conf.xml $EXIST_HOME/config/conf.xml
COPY controller-config.xml $EXIST_HOME/config/controller-config.xml
COPY web.xml $EXIST_HOME/webapp/WEB-INF/web.xml
COPY jetty.xml $EXIST_HOME/tools/jetty/etc/jetty.xml
COPY log4j2.xml $EXIST_HOME/config/log4j2.xml
COPY --from=builder /tmp/exist/build/oidb-[0-9]*.*.xar $EXIST_HOME/autodeploy/zz_oidb.xar
COPY conf.xml $EXIST_HOME/etc/conf.xml
COPY controller-config.xml $EXIST_HOME/etc/webapp/WEB-INF/controller-config.xml
COPY web.xml $EXIST_HOME/etc/webapp/WEB-INF/web.xml
COPY jetty.xml $EXIST_HOME/etc/jetty/jetty.xml
#COPY log4j2.xml $EXIST_HOME/config/log4j2.xml
# for workarround ... https://github.com/eXist-db/documentation/issues/385#issuecomment-537105064
COPY --from=builder /tmp/exist/jmmc-resources*/content/*.jar $EXIST_HOME/lib/user/
# see .env file
ARG CLASSPATH
ENV CLASSPATH $CLASSPATH
This diff is collapsed.
......@@ -8,6 +8,7 @@
-->
<configuration xmlns="http://exist.sourceforge.net/NS/exist" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://exist.sourceforge.net/NS/exist file:../../schema/controller-config.xsd">
<!-- TAP servlet -->
<forward pattern="/tap" servlet="OiDBTAPServlet"/>
......@@ -29,11 +30,6 @@
<!-- RESTXQ -->
<forward pattern="/restxq/" servlet="RestXqServlet"/>
<!-- OAuth servlet -->
<!--
<forward pattern="/oauth" servlet="OAuthServlet"/>
-->
<!-- scale images on the fly and cache the output. -->
<!--
<forward pattern="/images" servlet="ScaleImageJAI"/>
......
......@@ -171,7 +171,7 @@ java.lang.IllegalStateException: Parent for temp dir not configured correctly: w
<Arg>
<New class="org.apache.commons.dbcp2.BasicDataSource">
<Set name="driverClassName">org.postgresql.Driver</Set>
<Set name="url">jdbc:postgresql://db:5432/oidb</Set>
<Set name="url">jdbc:postgresql://db:5432/oidb?loggerLevel=DEBUG</Set>
<Set name="username">oidb</Set>
<Set name="password">oidb</Set>
<!-- pool settings -->
......@@ -186,5 +186,22 @@ java.lang.IllegalStateException: Parent for temp dir not configured correctly: w
</New>
</Arg>
</New>
<!--
<New id="DSOiDB" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg></Arg>
<Arg>jdbc/oidb</Arg>
<Arg>
<New class="org.postgresql.ds.PGConnectionPoolDataSource">
<Set name="User">oidb</Set>
<Set name="Password">oidb</Set>
<Set name="DatabaseName">oidb</Set>
<Set name="ServerName">db</Set>
<Set name="PortNumber">5432</Set>
</New>
</Arg>
</New>
-->
<!-- END OIDB Data source -->
</Configure>
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment