Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Cleanup of docker compose profiles

Rich Turner46eaa8b5eb23
diff --git a/.ci_cd/mvp/mvp-docker-compose-awslogs.yml b/.ci_cd/mvp/mvp-docker-compose-awslogs.yml
index b6db7ae03..8d72d7183 100644
--- a/.ci_cd/mvp/mvp-docker-compose-awslogs.yml
+++ b/.ci_cd/mvp/mvp-docker-compose-awslogs.yml
@@ -99,7 +99,7 @@ services:
SETUP_EMAIL_USER: ${EMAIL_USER}
SETUP_EMAIL_PASSWORD: ${EMAIL_PASSWORD}
SETUP_EMAIL_PORT: ${SETUP_EMAIL_PORT:-587}
- SETUP_EMAIL_TO: ${SETUP_EMAIL_TO}
+ SETUP_EMAIL_ADMIN: ${SETUP_EMAIL_ADMIN}
SETUP_EMAIL_FROM: ${SETUP_EMAIL_FROM}
<<: *awslogs
diff --git a/docker-compose.yml b/docker-compose.yml
index 4298a48a5..2a9be0479 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -35,7 +35,7 @@ services:
volumes:
- proxy-data:/deployment
environment:
- LE_EMAIL: ${SETUP_EMAIL_TO}
+ LE_EMAIL: ${SETUP_EMAIL_ADMIN:-}
DOMAINNAME: ${HOST:-localhost}
# USE A CUSTOM PROXY CONFIG - COPY FROM https://github.com/openremote/proxy/blob/main/haproxy.cfg
#HAPROXY_CONFIG: '/data/proxy/haproxy.cfg'
@@ -75,7 +75,7 @@ services:
SETUP_EMAIL_USER:
SETUP_EMAIL_PASSWORD:
SETUP_EMAIL_FROM:
- SETUP_EMAIL_TO:
+ SETUP_EMAIL_ADMIN:
EXTERNAL_URL: https://${HOST:-localhost}
DEV_MODE:
# The following variables will configure the demo
diff --git a/manager/Dockerfile b/manager/Dockerfile
index ea173b9fd..5ce9dae84 100644
--- a/manager/Dockerfile
+++ b/manager/Dockerfile
@@ -18,7 +18,7 @@ ENV SETUP_EMAIL_PASSWORD ${SETUP_EMAIL_PASSWORD}
ENV SETUP_EMAIL_PORT ${SETUP_EMAIL_PORT:-587}
ENV SETUP_EMAIL_TLS ${SETUP_EMAIL_TLS:-true}
ENV SETUP_EMAIL_FROM ${SETUP_EMAIL_FROM}
-ENV SETUP_EMAIL_TO ${SETUP_EMAIL_TO}
+ENV SETUP_EMAIL_ADMIN ${SETUP_EMAIL_ADMIN}
ENV NOTIFICATION_FIREBASE_URL ${NOTIFICATION_FIREBASE_URL:-https://fcm.googleapis.com/fcm/send}
ENV NOTIFICATION_FIREBASE_API_KEY ${NOTIFICATION_FIREBASE_API_KEY}
ENV FIREBASE_CONFIG_FILE ${FIREBASE_CONFIG_FILE:-/deployment/manager/fcm.json}
diff --git a/model/src/main/java/org/openremote/model/Constants.java b/model/src/main/java/org/openremote/model/Constants.java
index 3a7362bb6..8216e5212 100644
--- a/model/src/main/java/org/openremote/model/Constants.java
+++ b/model/src/main/java/org/openremote/model/Constants.java
@@ -58,7 +58,7 @@ public interface Constants {
boolean SETUP_EMAIL_TLS_DEFAULT = true;
String SETUP_EMAIL_FROM = "SETUP_EMAIL_FROM";
String SETUP_EMAIL_FROM_DEFAULT = "no-reply@localhost";
- String SETUP_EMAIL_TO = "SETUP_EMAIL_TO";
+ String SETUP_EMAIL_ADMIN = "SETUP_EMAIL_ADMIN";
String REALM_PARAM_NAME = "Realm";
String ASSET_ID_REGEXP = "^[0-9A-Za-z]{22}$";
String UUID_REGEXP = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
diff --git a/profile/deploy.yml b/profile/deploy.yml
index f6d1fb4c1..8193b8b7f 100644
--- a/profile/deploy.yml
+++ b/profile/deploy.yml
@@ -12,12 +12,11 @@
#
# SETUP_ADMIN_PASSWORD
# HOST
-# EXTERNAL_URL
# ADMIN_EMAIL
# SETUP_EMAIL_HOST
# SETUP_EMAIL_USER
# SETUP_EMAIL_PASSWORD
-# SETUP_EMAIL_TO
+# SETUP_EMAIL_ADMIN
# SETUP_EMAIL_FROM
# NOTIFICATION_FIREBASE_API_KEY
# IDENTITY_PROVIDER
@@ -27,6 +26,8 @@ version: '2.4'
volumes:
postgresql-data: # Needed if you want to persist postgres data outside of container
temp-data: # Needed to share temp export data between postgres and manager containers
+ proxy-data: #Needed to persist SSL certificates to avoid excessive requests to Letsencrypt
+ btmesh-data: #Needed to persist Bluetooth mesh data (if using Bluetooth mesh)
services:
@@ -36,9 +37,8 @@ services:
proxy:
image: openremote/proxy:${PROXY_VERSION:-2.5.0.1}
restart: always
- # Override the haproxy.cfg with custom file
- #volumes:
- # -${MY_PROXY_CONFIG_FILE}:/etc/haproxy/haproxy.cfg
+ volumes:
+ - proxy-data:/deployment
environment:
# It is important that all services have the same timezone and are time synchronized.
@@ -55,13 +55,13 @@ services:
# The public host name of this OpenRemote installation. Set this to request/manage an SSL
# certificate with the free https://letsencrypt.org/ provider. The default 'localhost' will
# rely on a baked-in self-signed certificate.
- DOMAINNAME: ${HOST}
+ DOMAINNAME: ${HOST:-localhost}
# USE A CUSTOM PROXY CONFIG - COPY FROM https://github.com/openremote/proxy/blob/main/haproxy.cfg
HAPROXY_CONFIG: ${HAPROXY_CONFIG}
# Email address for SSL certificate issuance and expiration notifications.
- LE_EMAIL: ${SETUP_EMAIL_TO}
+ LE_EMAIL: ${SETUP_EMAIL_ADMIN}
# Enable --staging will manage fake certificates, so avoid hitting the rate limits of Let's Encrypt
# when testing (this is important, you are limited to 5 duplicate certificates per week!)
@@ -102,6 +102,7 @@ services:
# The OpenRemote Manager
manager:
image: openremote/manager:${MANAGER_VERSION:-latest}
+ # privileged: true # Needed for dbus access when using Bluetooth
restart: always
# Map any custom content into the /deployment dir:
# /deployment/manager/app - contains custom web content
@@ -147,7 +148,7 @@ services:
# The public URL of the proxy in front of this manager; must match the proxy#DOMAINNAME (unfortunately
# docker compose doesn't support chaining environment variables at time of writing, hence the need for
# two environment variables)
- EXTERNAL_URL: ${EXTERNAL_URL:-https://localhost}
+ EXTERNAL_URL: https://${HOST:-localhost}
# Configure Email, SMTP server to send password reset emails etc.
SETUP_EMAIL_HOST:
@@ -155,8 +156,12 @@ services:
SETUP_EMAIL_PASSWORD:
SETUP_EMAIL_PORT: ${SETUP_EMAIL_PORT}
SETUP_EMAIL_TLS: ${SETUP_EMAIL_TLS}
- SETUP_EMAIL_TO: ${SETUP_EMAIL_TO}
- SETUP_EMAIL_FROM_DEFAULT: ${SETUP_EMAIL_FROM}
+
+ # Where to send admin emails to
+ SETUP_EMAIL_ADMIN: ${SETUP_EMAIL_ADMIN}
+
+ # From address for emails sent by the system
+ SETUP_EMAIL_FROM: ${SETUP_EMAIL_FROM}
# Console applications can register for push notifications through FCM.
NOTIFICATION_FIREBASE_URL: ${NOTIFICATION_FIREBASE_URL:-https://fcm.googleapis.com/fcm/send}
@@ -305,7 +310,7 @@ services:
KEYCLOAK_USER: ${KEYCLOAK_USER:-admin}
KEYCLOAK_PASSWORD: ${SETUP_ADMIN_PASSWORD:-secret}
PROXY_ADDRESS_FORWARDING: ${PROXY_ADDRESS_FORWARDING:-true}
- KEYCLOAK_FRONTEND_URL: ${EXTERNAL_URL:-https://localhost}/auth
+ KEYCLOAK_FRONTEND_URL: https://${HOST:-localhost}/auth
# Custom JVM options (increase heap size if required)
JAVA_OPTS: ${KEYCLOAK_JAVA_OPTS:--XX:CompressedClassSpaceSize=50m -XX:MaxMetaspaceSize=250m
@@ -324,7 +329,7 @@ services:
# Docker volume for persistent storage of DB; can alternatively map to host
volumes:
- temp-data:/tmp
- # - postgresql-data:/var/lib/postgresql/data
+ - postgresql-data:/var/lib/postgresql/data
#ports:
# - "5432:5432" # DB server
environment:
diff --git a/profile/dev-map.yml b/profile/dev-map.yml
index 5232165db..15a68122a 100644
--- a/profile/dev-map.yml
+++ b/profile/dev-map.yml
@@ -11,7 +11,7 @@ services:
map:
extends:
file: deploy.yml
- service: map
+ service: tileserver
ports:
- "8082:80"
volumes:
diff --git a/profile/dev-proxy.yml b/profile/dev-proxy.yml
index 406898492..ce5d6bba1 100644
--- a/profile/dev-proxy.yml
+++ b/profile/dev-proxy.yml
@@ -25,10 +25,6 @@ services:
MANAGER_HOST: 'host.docker.internal'
KEYCLOAK_HOST: 'host.docker.internal'
KEYCLOAK_PORT: 8081
- ports:
- - "80:80" # HTTP for letsencrypt cert generation and in general it redirects to 443 for HTTPS
- - "443:443" # HTTPS /auth directs to keycloak and other paths direct to manager
- - "8883:8883" # MQTTS
keycloak:
extends:
@@ -46,7 +42,7 @@ services:
condition: service_healthy
environment:
# Use manager dev mode reverse proxy to access keycloak so manager and keycloak hosts match
- KEYCLOAK_FRONTEND_URL: ${EXTERNAL_URL:-https://localhost}/auth
+ KEYCLOAK_FRONTEND_URL: https://${HOST:-localhost}/auth
postgresql:
extends:
diff --git a/profile/dev-testing.yml b/profile/dev-testing.yml
index 15d208ecf..a007ffe09 100644
--- a/profile/dev-testing.yml
+++ b/profile/dev-testing.yml
@@ -24,7 +24,7 @@ services:
condition: service_healthy
environment:
# Use manager dev mode reverse proxy to access keycloak so manager and keycloak hosts match
- KEYCLOAK_FRONTEND_URL: ${EXTERNAL_URL:-http://localhost:8080}/auth
+ KEYCLOAK_FRONTEND_URL: http://${HOST:-localhost:8080}/auth
postgresql:
extends: