Browse Source

Deploy the gemini app as a war file (#3606)

This brings it in line with every other Resin-using app in TFB.  Also,
as far as I know, real gemini apps are deployed as war files.
Michael Hixson 7 years ago
parent
commit
56748dd163

+ 0 - 21
frameworks/Java/gemini/Docroot/WEB-INF/resin.xml

@@ -1,21 +0,0 @@
-<resin xmlns="http://caucho.com/ns/resin"
-       xmlns:resin="http://caucho.com/ns/resin/core">
-
-  <cluster id="">
-    
-    <resin:import path="/resin/conf/app-default.xml" />
-    <log name="" level="config" path="stdout:" timestamp="[%H:%M:%S.%s] " />
-
-    <server id="">
-      <jvm-arg>-Xms1g</jvm-arg>
-      <jvm-arg>-Xmx1g</jvm-arg>
-
-      <http port="8080" />
-    </server>
-
-    <host>
-      <web-app id="/" root-directory="/gemini/Docroot" />
-    </host>
-
-  </cluster>
-</resin>

+ 4 - 11
frameworks/Java/gemini/build.xml

@@ -1,14 +1,3 @@
-<!--
-  
-  Ant build script for GeminiHello.  Running this script produces a .zip archive 
-  with the following structure:
-  
-    GeminiHello-yyyy-MM-dd.zip
-       |~ GeminiHello.war
-       |~ Source
-       |~~~ (The current source code of GeminiHello and Gemini.)
-  
--->
 <project default="build" name="geminihello" xmlns:ivy="antlib:org.apache.ivy.ant" >
 <project default="build" name="geminihello" xmlns:ivy="antlib:org.apache.ivy.ant" >
 
 
   <target name="compile">
   <target name="compile">
@@ -34,6 +23,10 @@
     
     
   </target>
   </target>
 
 
+  <target name="package" depends="compile">
+    <war destfile="gemini.war" basedir="Docroot"/>
+  </target>
+
   <property name="ivy.install.version" value="2.4.0" />
   <property name="ivy.install.version" value="2.4.0" />
   <condition property="ivy.home" value="${env.IVY_HOME}">
   <condition property="ivy.home" value="${env.IVY_HOME}">
     <isset property="env.IVY_HOME" />
     <isset property="env.IVY_HOME" />

+ 3 - 2
frameworks/Java/gemini/gemini-mysql.dockerfile

@@ -12,9 +12,10 @@ RUN mv Docroot/WEB-INF/gemini-mysql.conf Docroot/WEB-INF/GeminiHello.conf
 RUN mkdir Docroot/WEB-INF/classes
 RUN mkdir Docroot/WEB-INF/classes
 RUN mkdir Docroot/WEB-INF/lib
 RUN mkdir Docroot/WEB-INF/lib
 RUN ant resolve
 RUN ant resolve
-RUN ant compile
+RUN ant package
 
 
 WORKDIR /resin
 WORKDIR /resin
 RUN curl -sL http://caucho.com/download/resin-4.0.56.tar.gz | tar xz --strip-components=1
 RUN curl -sL http://caucho.com/download/resin-4.0.56.tar.gz | tar xz --strip-components=1
 RUN rm -rf webapps/*
 RUN rm -rf webapps/*
-CMD ["java", "-jar", "lib/resin.jar", "-conf", "/gemini/Docroot/WEB-INF/resin.xml", "console"]
+RUN cp /gemini/gemini.war webapps/ROOT.war
+CMD ["java", "-jar", "lib/resin.jar", "console"]

+ 3 - 2
frameworks/Java/gemini/gemini-postgres.dockerfile

@@ -12,9 +12,10 @@ RUN mv Docroot/WEB-INF/gemini-postgres.conf Docroot/WEB-INF/GeminiHello.conf
 RUN mkdir Docroot/WEB-INF/classes
 RUN mkdir Docroot/WEB-INF/classes
 RUN mkdir Docroot/WEB-INF/lib
 RUN mkdir Docroot/WEB-INF/lib
 RUN ant resolve
 RUN ant resolve
-RUN ant compile
+RUN ant package
 
 
 WORKDIR /resin
 WORKDIR /resin
 RUN curl -sL http://caucho.com/download/resin-4.0.56.tar.gz | tar xz --strip-components=1
 RUN curl -sL http://caucho.com/download/resin-4.0.56.tar.gz | tar xz --strip-components=1
 RUN rm -rf webapps/*
 RUN rm -rf webapps/*
-CMD ["java", "-jar", "lib/resin.jar", "-conf", "/gemini/Docroot/WEB-INF/resin.xml", "console"]
+RUN cp /gemini/gemini.war webapps/ROOT.war
+CMD ["java", "-jar", "lib/resin.jar", "console"]

+ 3 - 2
frameworks/Java/gemini/gemini.dockerfile

@@ -12,9 +12,10 @@ RUN mv Docroot/WEB-INF/gemini.conf Docroot/WEB-INF/GeminiHello.conf
 RUN mkdir Docroot/WEB-INF/classes
 RUN mkdir Docroot/WEB-INF/classes
 RUN mkdir Docroot/WEB-INF/lib
 RUN mkdir Docroot/WEB-INF/lib
 RUN ant resolve
 RUN ant resolve
-RUN ant compile
+RUN ant package
 
 
 WORKDIR /resin
 WORKDIR /resin
 RUN curl -sL http://caucho.com/download/resin-4.0.56.tar.gz | tar xz --strip-components=1
 RUN curl -sL http://caucho.com/download/resin-4.0.56.tar.gz | tar xz --strip-components=1
 RUN rm -rf webapps/*
 RUN rm -rf webapps/*
-CMD ["java", "-jar", "lib/resin.jar", "-conf", "/gemini/Docroot/WEB-INF/resin.xml", "console"]
+RUN cp /gemini/gemini.war webapps/ROOT.war
+CMD ["java", "-jar", "lib/resin.jar", "console"]