100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
More hacking on CCS
Christian Bauerfb444dbadc49
diff --git a/base/tomcat/Dockerfile b/base/tomcat/Dockerfileindex fa4f0d35c..734403c30 100644--- a/base/tomcat/Dockerfile+++ b/base/tomcat/Dockerfile@@ -1,4 +1,4 @@-FROM tomcat:7.0-jre7+FROM tomcat:7.0.73-jre8# Remove default webappsRUN rm -rf /usr/local/tomcat/webapps/*diff --git a/base/tomcat/conf/server_tpl.xml b/base/tomcat/conf/server_tpl.xmlindex a75a246db..09a6fad53 100644--- a/base/tomcat/conf/server_tpl.xml+++ b/base/tomcat/conf/server_tpl.xml@@ -20,18 +20,18 @@Documentation at /docs/config/server.html--><Server port="8005" shutdown="SHUTDOWN">- <Listener className="org.apache.catalina.startup.VersionLoggerListener" />+ <Listener className="org.apache.catalina.startup.VersionLoggerListener"/><!-- Security listener. Documentation at /docs/config/listeners.html<Listener className="org.apache.catalina.security.SecurityListener" />--><!--APR library loader. Documentation at /docs/apr.html -->- <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />+ <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"/><!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->- <Listener className="org.apache.catalina.core.JasperListener" />+ <Listener className="org.apache.catalina.core.JasperListener"/><!-- Prevent memory leaks due to use of particular java/javax APIs-->- <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />- <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />- <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />+ <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>+ <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>+ <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/><!-- Global JNDI resourcesDocumentation at /docs/jndi-resources-howto.html@@ -44,11 +44,12 @@type="org.apache.catalina.UserDatabase"description="User database that can be updated and saved"factory="org.apache.catalina.users.MemoryUserDatabaseFactory"- pathname="conf/tomcat-users.xml" />+ pathname="conf/tomcat-users.xml"/><Resource name="jdbc/AuthDB" auth="Container" type="javax.sql.DataSource"maxActive="100" maxIdle="30" maxWait="10000"- username="${BEEHIVE_DB_USERNAME}" password="${BEEHIVE_DB_PASSWORD}" driverClassName="${BEEHIVE_DB_DRIVER}"+ username="${BEEHIVE_DB_USERNAME}" password="${BEEHIVE_DB_PASSWORD}"+ driverClassName="${BEEHIVE_DB_DRIVER}"url="${BEEHIVE_DB_URL}"validationQuery="/* ping */ SELECT 1" testWhileIdle="true"/></GlobalNamingResources>@@ -97,10 +98,10 @@connectionTimeout="-1"maxThreads="150" SSLEnabled="true" scheme="https" secure="true"keystoreFile="keystore.jks" keystorePass="${SSL_KEY_STORE_PASSWORD}"- clientAuth="false" sslProtocol="TLS" />+ clientAuth="false" sslProtocol="TLS"/><!-- Define an AJP 1.3 Connector on port 8009 -->- <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />+ <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/><!-- An Engine represents the entry point (within Catalina) that processes@@ -136,7 +137,7 @@userRoleTable="tomcat_user_role" roleNameCol="rolename"/></Realm>- <Host name="localhost" appBase="webapps"+ <Host name="localhost" appBase="webapps"unpackWARs="true" autoDeploy="true"><!-- SingleSignOn valve, share authentication between web applications@@ -148,10 +149,11 @@<!-- Access log processes all example.Documentation at: /docs/config/valve.htmlNote: The pattern used is equivalent to using pattern="common" -->+ <!--<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"prefix="localhost_access_log." suffix=".txt"pattern="%h %l %u %t "%r" %s %b" />-+ --></Host></Engine></Service>diff --git a/beehive/ccs/Dockerfile b/beehive/ccs/Dockerfileindex d7897f071..a159cbf5c 100644--- a/beehive/ccs/Dockerfile+++ b/beehive/ccs/Dockerfile@@ -2,4 +2,5 @@ FROM openremote/tomcat:latestADD build/libs/ccs.war webapps/ADD conf/keystore.jks ./+ADD conf/logging.properties conf/diff --git a/beehive/ccs/build.gradle b/beehive/ccs/build.gradleindex c18dca12b..40cb9264b 100644--- a/beehive/ccs/build.gradle+++ b/beehive/ccs/build.gradle@@ -11,7 +11,9 @@ dependencies {compile "net.sf.flexjson:flexjson:$flexjsonVersion"compile "org.slf4j:slf4j-api:$slf4jVersion"- compile "ch.qos.logback:logback-classic:1.1.3"+ compile "org.slf4j:slf4j-jdk14:$slf4jVersion"+ compile "org.slf4j:jcl-over-slf4j:$slf4jVersion"+ compile "org.slf4j:log4j-over-slf4j:$slf4jVersion"compile "org.glassfish.jersey.containers:jersey-container-servlet-core:$jerseyVersion"compile "javax.ws.rs:javax.ws.rs-api:$jaxrsVersion"diff --git a/beehive/ccs/conf/logging.properties b/beehive/ccs/conf/logging.propertiesnew file mode 100644index 000000000..8114e56e3--- /dev/null+++ b/beehive/ccs/conf/logging.properties@@ -0,0 +1,5 @@+handlers = java.util.logging.ConsoleHandler++.level = INFO+org.openremote.level = INFO+org.hibernate.level = INFOdiff --git a/profile/ccs.yml b/profile/ccs.ymlindex 51fed732a..ce6d2c62a 100644--- a/profile/ccs.yml+++ b/profile/ccs.yml@@ -30,12 +30,6 @@ services:ccs:build:context: ../../beehive/ccs- ports:- - "8443:8443"- - "5005:5005"- # TODO Why is this necessary? Is CCS connecting with itself?- extra_hosts:- - "ccs:127.0.0.1"environment:BEEHIVE_DB_USERNAME: "openremote"BEEHIVE_DB_PASSWORD: "CHANGE_ME_DB_USER_PASSWORD"@@ -47,3 +41,9 @@ services:JPDA_SUSPEND: "n"links:- mysql+ ports:+ - "8443:8443"+ - "5005:5005"+ # TODO Why is this necessary? Is CCS connecting with itself?+ extra_hosts:+ - "ccs:127.0.0.1"