Commit dc5fa2a9 authored by Misagh Moayyed's avatar Misagh Moayyed

finalized docker work based on jib

parent 2a9b5ff1
......@@ -126,10 +126,15 @@ jib {
}
}
task copyWebAppIntoJib(type: Copy, group: "build") {
dependsOn build
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"
}
......@@ -138,7 +143,7 @@ task deleteWebAppFromJib(type: Delete, group: "build") {
}
tasks.findByName("jibDockerBuild")
.dependsOn(copyWebAppIntoJib)
.dependsOn(copyWebAppIntoJib, copyConfigIntoJib)
.finalizedBy(deleteWebAppFromJib)
task explodeWar(type: Copy, group: "build", description: "Explodes the CAS web application archive") {
......
cas.server.name: https://cas.example.org:8443
cas.server.prefix: https://cas.example.org:8443/cas
cas.server.name=https://cas.example.org:8443
cas.server.prefix=${cas.server.name}/cas
logging.config: file:/etc/cas/config/log4j2.xml
# cas.authn.accept.users=
......@@ -4,7 +4,7 @@
<Properties>
<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.security.log.level">info</Property>
<Property name="spring.cloud.log.level">warn</Property>
......@@ -17,7 +17,7 @@
</Properties>
<Appenders>
<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>
<RollingFile name="file" fileName="${baseDir}/cas.log" append="true"
filePattern="${baseDir}/cas-%d{yyyy-MM-dd-HH}-%i.log">
......
#!/bin/sh
echo "Checking java..."
java -version
#echo -e "\nChecking java..."
#java -version
echo "Creating CAS configuration directories..."
#echo -e "\nCreating CAS configuration directories..."
mkdir -p /etc/cas/config
mkdir -p /etc/cas/services
echo "Running CAS..."
java -Xms512m -Xmx2048M -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -jar docker/cas/cas.war
#echo "Listing provided CAS docker artifacts..."
#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