Commit dc5fa2a9 authored by Misagh Moayyed's avatar Misagh Moayyed

finalized docker work based on jib

parent 2a9b5ff1
...@@ -126,10 +126,15 @@ jib { ...@@ -126,10 +126,15 @@ jib {
} }
} }
task copyWebAppIntoJib(type: Copy, group: "build") { task copyWebAppIntoJib(type: Copy, group: "build") {
dependsOn build dependsOn build
from "build/libs/${casWebApplicationBinaryName}" from "build/libs/${casWebApplicationBinaryName}"
into "src/main/jib/docker/cas/war"
task copyConfigIntoJib(type: Copy, group: "build") {
dependsOn build
from "etc/cas"
into "src/main/jib/docker/cas" into "src/main/jib/docker/cas"
} }
...@@ -138,7 +143,7 @@ task deleteWebAppFromJib(type: Delete, group: "build") { ...@@ -138,7 +143,7 @@ task deleteWebAppFromJib(type: Delete, group: "build") {
} }
tasks.findByName("jibDockerBuild") tasks.findByName("jibDockerBuild")
.dependsOn(copyWebAppIntoJib) .dependsOn(copyWebAppIntoJib, copyConfigIntoJib)
.finalizedBy(deleteWebAppFromJib) .finalizedBy(deleteWebAppFromJib)
task explodeWar(type: Copy, group: "build", description: "Explodes the CAS web application archive") { task explodeWar(type: Copy, group: "build", description: "Explodes the CAS web application archive") {
cas.server.prefix: cas.server.prefix=${}/cas
logging.config: file:/etc/cas/config/log4j2.xml logging.config: file:/etc/cas/config/log4j2.xml
# cas.authn.accept.users=
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<Properties> <Properties>
<Property name="baseDir">/var/log</Property> <Property name="baseDir">/var/log</Property>
<Property name="cas.log.level">warn</Property> <Property name="cas.log.level">info</Property>
<Property name="spring.webflow.log.level">warn</Property> <Property name="spring.webflow.log.level">warn</Property>
<Property name="">info</Property> <Property name="">info</Property>
<Property name="">warn</Property> <Property name="">warn</Property>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</Properties> </Properties>
<Appenders> <Appenders>
<Console name="console" target="SYSTEM_OUT"> <Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="%d %p [%c] - &lt;%m&gt;%n"/> <PatternLayout pattern="%highlight{%d %p [%c] - &lt;%m&gt;}%n"/>
</Console> </Console>
<RollingFile name="file" fileName="${baseDir}/cas.log" append="true" <RollingFile name="file" fileName="${baseDir}/cas.log" append="true"
filePattern="${baseDir}/cas-%d{yyyy-MM-dd-HH}-%i.log"> filePattern="${baseDir}/cas-%d{yyyy-MM-dd-HH}-%i.log">
#!/bin/sh #!/bin/sh
echo "Checking java..." #echo -e "\nChecking java..."
java -version #java -version
echo "Creating CAS configuration directories..." #echo -e "\nCreating CAS configuration directories..."
mkdir -p /etc/cas/config mkdir -p /etc/cas/config
mkdir -p /etc/cas/services mkdir -p /etc/cas/services
echo "Running CAS..." #echo "Listing provided CAS docker artifacts..."
java -Xms512m -Xmx2048M -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -jar docker/cas/cas.war #ls -R docker/cas
#echo -e "\nMoving CAS configuration artifacts..."
mv docker/cas/thekeystore /etc/cas 2>/dev/null
mv docker/cas/config/*.* /etc/cas/config 2>/dev/null
mv docker/cas/services/*.* /etc/cas/services 2>/dev/null
#echo -e "\nListing CAS configuration under /etc/cas..."
#ls -R /etc/cas
echo -e "\nRunning CAS..."
java -Xms512m -Xmx2048M -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -jar docker/cas/war/cas.war
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