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
Fixed demo/quickstart build
Christian Bauerb069a6dd8588
diff --git a/docker-compose-demo.yml b/docker-compose-demo.ymlindex 19d31b173..4fe2a9181 100644--- a/docker-compose-demo.yml+++ b/docker-compose-demo.yml@@ -3,39 +3,39 @@ version: '2'services:manager:image: openremote/manager:latest- depends_on:- - orion+ links:+ - postgres- keycloakenvironment:TZ: "Europe/Zurich"DEV_MODE: 'false'+ DATABASE_CREATE_SCHEMA: 'true'IMPORT_SAMPLE_DATA: 'true'WEBSERVER_LISTEN_HOST: 0.0.0.0WEBSERVER_LISTEN_PORT: 8080IDENTITY_NETWORK_HOST: demo2.openremote.comIDENTITY_NETWORK_WEBSERVER_PORT: 80- CONTEXTBROKER_HOST: orion- CONTEXTBROKER_PORT: 1026+ DATABASE_CONNECTION_URL: jdbc:postgresql://postgres/openremoteKEYCLOAK_HOST: keycloakKEYCLOAK_PORT: 8080ports:- "8090:8080"keycloak:image: openremote/keycloak:latest+ links:+ - postgres:postgresqlenvironment:TZ: "Europe/Zurich"KEYCLOAK_USER: adminKEYCLOAK_PASSWORD: adminKEYCLOAK_LOGLEVEL: DEBUG- mongo:- image: mongo:3.2- command: --smallfiles+ POSTGRES_DATABASE: openremote+ POSTGRES_USER: openremote+ POSTGRES_PASSWORD: secret+ postgres:+ image: openremote/postgres:latestenvironment:- TZ: "Europe/Zurich"- orion:- image: fiware/orion:1.2.1- links:- - mongo- command: -dbhost mongo- environment:- TZ: "Europe/Zurich"+ TZ: "Europe/Zurich"+ POSTGRES_USER: postgres+ POSTGRES_PASSWORD: secret+ POSTGRES_DB: openremotediff --git a/docker-compose-quickstart.yml b/docker-compose-quickstart.ymlindex afaad13f5..8b5a96364 100644--- a/docker-compose-quickstart.yml+++ b/docker-compose-quickstart.yml@@ -15,8 +15,8 @@ services:- "8080:8080"# This service needs access to other services on the Docker network.- depends_on:- - orion+ links:+ - postgres- keycloakenvironment:@@ -28,8 +28,12 @@ services:# If dev mode is enabled, caching and other performance-optimizations will be disabled.DEV_MODE: 'false'- # If this is the first time you are starting this stack, and/or with non-persistent- # context broker (the default), you might want to work with some automatically imported+ # If this is the first time you are starting this stack, and/or with non-durable+ # database (the default), you need to have the database schema created.+ DATABASE_CREATE_SCHEMA: 'true'++ # If this is the first time you are starting this stack, and/or with non-durable+ # database (the default), you might want to work with some automatically imported# sample data.IMPORT_SAMPLE_DATA: 'true'@@ -47,9 +51,8 @@ services:# port.IDENTITY_NETWORK_WEBSERVER_PORT: 8080- # The service-internal host name and port of the context broker, configured automatically.- CONTEXTBROKER_HOST: orion- CONTEXTBROKER_PORT: 1026+ # The service-internal JDBC connection URL for the database service.+ DATABASE_CONNECTION_URL: jdbc:postgresql://postgres/openremote# The service-internal host name and port of the identity provider, configured automatically.KEYCLOAK_HOST: keycloak@@ -58,6 +61,8 @@ services:# The identity provider, we use OAuth2 and bearer tokens for all API access.keycloak:image: openremote/keycloak:latest+ links:+ - postgres:postgresqlenvironment:TZ: "Europe/Zurich"KEYCLOAK_USER: admin@@ -67,18 +72,20 @@ services:# not be imported in production.KEYCLOAK_PASSWORD: admin- # MongoDB is the storage backend of Orion.- mongo:- image: mongo:3.2- command: --smallfiles- environment:- TZ: "Europe/Zurich"+ # Configure how Keycloak connects to the database+ POSTGRES_DATABASE: openremote+ POSTGRES_USER: openremote+ POSTGRES_PASSWORD: secret- # Orion is the context broker, it holds the current state of all IoT assets and devices.- orion:- image: fiware/orion:1.2.1- links:- - mongo- command: -dbhost mongo+ # The database service.+ postgres:+ image: openremote/postgres:latestenvironment:- TZ: "Europe/Zurich"+ TZ: "Europe/Zurich"+ # This is the database superuser and password. You should change this, especially if you+ # expose the database port and make it accessible externally! Internally, we are using a+ # different user/password combination to access the 'openremote' database (currently+ # baked into the image).+ POSTGRES_USER: postgres+ POSTGRES_PASSWORD: secret+ POSTGRES_DB: openremotediff --git a/keycloak/Dockerfile-demo b/keycloak/Dockerfile-demoindex c0807dec5..3bcc444a6 100644--- a/keycloak/Dockerfile-demo+++ b/keycloak/Dockerfile-demo@@ -2,7 +2,8 @@ FROM jboss/keycloak:2.1.0.FinalADD changeDatabase.xsl /opt/jboss/keycloak/RUN java -jar /usr/share/java/saxon.jar -s:/opt/jboss/keycloak/standalone/configuration/standalone.xml -xsl:/opt/jboss/keycloak/changeDatabase.xsl -o:/opt/jboss/keycloak/standalone/configuration/standalone.xml; java -jar /usr/share/java/saxon.jar -s:/opt/jboss/keycloak/standalone/configuration/standalone-ha.xml -xsl:/opt/jboss/keycloak/changeDatabase.xsl -o:/opt/jboss/keycloak/standalone/configuration/standalone-ha.xml; rm /opt/jboss/keycloak/changeDatabase.xsl-RUN mkdir -p /opt/jboss/keycloak/modules/system/layers/base/org/postgresql/jdbc/main; curl -o /opt/jboss/keycloak/modules/system/layers/base/org/postgresql/jdbc/main/postgresql-jdbc.jar http://repo1.maven.org/maven2/org/postgresql/postgresql/9.4.1209/postgresql-9.4.1209.jar+RUN mkdir -p /opt/jboss/keycloak/modules/system/layers/base/org/postgresql/jdbc/main+RUN curl -o /opt/jboss/keycloak/modules/system/layers/base/org/postgresql/jdbc/main/postgresql-jdbc.jar http://repo1.maven.org/maven2/org/postgresql/postgresql/9.4.1209/postgresql-9.4.1209.jar 2>/dev/nullADD module.xml /opt/jboss/keycloak/modules/system/layers/base/org/postgresql/jdbc/main/ADD setProxyForwarding.xsl /opt/jboss/keycloak/diff --git a/keycloak/Dockerfile-dev b/keycloak/Dockerfile-devindex 7c97762a3..61615c279 100644--- a/keycloak/Dockerfile-dev+++ b/keycloak/Dockerfile-dev@@ -2,7 +2,8 @@ FROM jboss/keycloak:2.1.0.FinalADD changeDatabase.xsl /opt/jboss/keycloak/RUN java -jar /usr/share/java/saxon.jar -s:/opt/jboss/keycloak/standalone/configuration/standalone.xml -xsl:/opt/jboss/keycloak/changeDatabase.xsl -o:/opt/jboss/keycloak/standalone/configuration/standalone.xml; java -jar /usr/share/java/saxon.jar -s:/opt/jboss/keycloak/standalone/configuration/standalone-ha.xml -xsl:/opt/jboss/keycloak/changeDatabase.xsl -o:/opt/jboss/keycloak/standalone/configuration/standalone-ha.xml; rm /opt/jboss/keycloak/changeDatabase.xsl-RUN mkdir -p /opt/jboss/keycloak/modules/system/layers/base/org/postgresql/jdbc/main; curl -o /opt/jboss/keycloak/modules/system/layers/base/org/postgresql/jdbc/main/postgresql-jdbc.jar http://repo1.maven.org/maven2/org/postgresql/postgresql/9.4.1209/postgresql-9.4.1209.jar+RUN mkdir -p /opt/jboss/keycloak/modules/system/layers/base/org/postgresql/jdbc/main+RUN curl -o /opt/jboss/keycloak/modules/system/layers/base/org/postgresql/jdbc/main/postgresql-jdbc.jar http://repo1.maven.org/maven2/org/postgresql/postgresql/9.4.1209/postgresql-9.4.1209.jar 2>/dev/nullADD module.xml /opt/jboss/keycloak/modules/system/layers/base/org/postgresql/jdbc/main/ADD setProxyForwarding.xsl /opt/jboss/keycloak/diff --git a/postgres/Dockerfile-demo b/postgres/Dockerfile-demoindex ba068cfaf..7bd99cbd4 100644--- a/postgres/Dockerfile-demo+++ b/postgres/Dockerfile-demo@@ -1,3 +1,3 @@FROM postgres:9.5-ADD 01-init-db.sh /docker-entrypoint-initdb.d/01-init-db.sh+ADD 01-init-user.sh /docker-entrypoint-initdb.d/01-init-user.shdiff --git a/postgres/Dockerfile-dev b/postgres/Dockerfile-devindex ba068cfaf..7bd99cbd4 100644--- a/postgres/Dockerfile-dev+++ b/postgres/Dockerfile-dev@@ -1,3 +1,3 @@FROM postgres:9.5-ADD 01-init-db.sh /docker-entrypoint-initdb.d/01-init-db.sh+ADD 01-init-user.sh /docker-entrypoint-initdb.d/01-init-user.shdiff --git a/settings.gradle b/settings.gradleindex 4b0c70a9b..0a65e7614 100644--- a/settings.gradle+++ b/settings.gradle@@ -1,6 +1,7 @@rootProject.name = "openremote"include "container",+ "postgres","keycloak","manager:shared","manager:server",