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
Streamline quickstart docker-compose.yml and minor test robustness update
Rich Turner2998e9c8c382
diff --git a/container/src/main/java/org/openremote/container/util/LogUtil.java b/container/src/main/java/org/openremote/container/util/LogUtil.javaindex eb7a59d77..eecc77451 100644--- a/container/src/main/java/org/openremote/container/util/LogUtil.java+++ b/container/src/main/java/org/openremote/container/util/LogUtil.java@@ -20,6 +20,7 @@package org.openremote.container.util;import org.openremote.model.Container;+import org.openremote.model.util.TextUtil;import java.io.InputStream;import java.nio.file.Files;@@ -51,7 +52,7 @@ public class LogUtil {// If no JUL configuration is providedif (System.getProperty("java.util.logging.config.file") == null) {// Load the logging configuration file specified with an environment variable- if (System.getenv(LOGGING_CONFIG_FILE) != null) {+ if (!TextUtil.isNullOrEmpty(System.getenv(LOGGING_CONFIG_FILE))) {Path loggingConfigFile = Paths.get(System.getenv(LOGGING_CONFIG_FILE));if (!Files.isReadable(loggingConfigFile)) {throw new ExceptionInInitializerError("LOGGING_CONFIG_FILE is not readable: " + loggingConfigFile.toAbsolutePath());diff --git a/docker-compose.yml b/docker-compose.ymlindex f51141651..e4223fdf4 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -17,33 +17,25 @@ services:proxy:image: openremote/proxy:${DATE_TAG:-latest}- extends:- file: profile/deploy.yml- service: proxydepends_on:manager:condition: service_healthy+ ports:+ - "80:80"+ - "443:443"+ - "8883:8883"manager:image: openremote/manager:${DATE_TAG:-latest}- extends:- file: profile/deploy.yml- service: managerdepends_on:keycloak:condition: service_healthykeycloak:image: openremote/keycloak:${DATE_TAG:-latest}- extends:- file: profile/deploy.yml- service: keycloakdepends_on:postgresql:condition: service_healthypostgresql:image: openremote/postgresql:${DATE_TAG:-latest}- extends:- file: profile/deploy.yml- service: postgresqldiff --git a/keycloak/Dockerfile b/keycloak/Dockerfileindex d39bc079c..f4c6cef81 100644--- a/keycloak/Dockerfile+++ b/keycloak/Dockerfile@@ -12,7 +12,6 @@ ENV JDBC_MARIADB_VERSION 2.5.4ENV JDBC_MSSQL_VERSION 8.2.2.jre11ENV LAUNCH_JBOSS_IN_BACKGROUND 1-ENV PROXY_ADDRESS_FORWARDING falseENV JBOSS_HOME /opt/jboss/keycloakENV LANG en_US.UTF-8@@ -20,11 +19,13 @@ ENV DB_VENDOR ${DB_VENDOR:-postgres}ENV DB_ADDR ${DB_ADDR:-postgresql}ENV DB_PORT ${DB_PORT:-5432}ENV DB_DATABASE ${DB_DATABASE:-openremote}-ENV DB_USER ${DB_USER:-openremote}-ENV DB_PASSWORD ${DB_PASSWORD:-openremote}+ENV DB_USER ${DB_USER:-postgres}+ENV DB_PASSWORD ${DB_PASSWORD:-postgres}ENV DB_SCHEMA ${DB_SCHEMA:-public}ENV KEYCLOAK_USER ${KEYCLOAK_USER:-admin}+ENV KEYCLOAK_PASSWORD ${SETUP_ADMIN_PASSWORD:-secret}ENV PROXY_ADDRESS_FORWARDING ${PROXY_ADDRESS_FORWARDING:-true}+ENV KEYCLOAK_FRONTEND_URL ${KEYCLOAK_FRONTEND_URL:-https://localhost/auth}ENV TZ ${TZ:-Europe/Amsterdam}ARG GIT_REPO@@ -45,7 +46,7 @@ ADD themes /opt/jboss/keycloak/themesADD module.xml /opt/jboss/keycloak/providersADD build/image/openremote-keycloak.jar /opt/jboss/keycloak/providers-HEALTHCHECK --interval=3s --timeout=3s --start-period=60s --retries=30 CMD curl --fail --silent http://localhost:8080/auth || exit 1+HEALTHCHECK --interval=3s --timeout=3s --start-period=30s --retries=30 CMD curl --fail --silent http://localhost:8080/auth || exit 1USER 1000diff --git a/postgresql/Dockerfile b/postgresql/Dockerfileindex e4d38e196..d4b252798 100644--- a/postgresql/Dockerfile+++ b/postgresql/Dockerfile@@ -2,11 +2,11 @@FROM postgres:9.6.21ENV POSTGIS_MAJOR 2.3-ENV TZ: ${TZ:-Europe/Amsterdam}-ENV PGTZ: ${PGTZ:-Europe/Amsterdam}-ENV POSTGRES_DB: ${POSTGRES_DB:-openremote}-ENV POSTGRES_USER: ${POSTGRES_USER:-postgres}-ENV POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}+ENV TZ ${TZ:-Europe/Amsterdam}+ENV PGTZ ${PGTZ:-Europe/Amsterdam}+ENV POSTGRES_DB ${POSTGRES_DB:-openremote}+ENV POSTGRES_USER ${POSTGRES_USER:-postgres}+ENV POSTGRES_PASSWORD ${POSTGRES_PASSWORD:-postgres}RUN apt-get update \&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \diff --git a/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusBasicTest.groovy b/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusBasicTest.groovyindex 650f27037..6f327777f 100644--- a/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusBasicTest.groovy+++ b/test/src/test/groovy/org/openremote/test/protocol/velbus/VelbusBasicTest.groovy@@ -40,7 +40,7 @@ class VelbusBasicTest extends Specification {def static MockVelbusClient messageProcessor = new MockVelbusClient()@Shared- def static PollingConditions conditions = new PollingConditions(timeout: 10, delay: 0.2)+ def static PollingConditions conditions = new PollingConditions(timeout: 20, delay: 0.2)static loadDevicePackets(MockVelbusClient messageProcessor) {messageProcessor.mockPackets = [