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
# OpenRemote v3
#
# This is the base configuration profile. Note that you must extend this configuration to complete
# it with service dependencies and volume mappings, see docker-compose.yml for a usable complete
# configuration.
#
# This file contains a description of all the environment variables available for each service
# including their default values. These can be overridden in many ways, shell environment variable,
# env file, extending/merging this compose file, etc.
#
# Here's a list of commonly customised environment variables:
#
# OR_ADMIN_PASSWORD
# OR_HOSTNAME
# OR_EMAIL_HOST
# OR_EMAIL_USER
# OR_EMAIL_PASSWORD
# OR_EMAIL_FROM
# OR_EMAIL_ADMIN
# OR_IDENTITY_PROVIDER
#
volumes:
# postgresql-data: # Needed if you want to persist postgres data outside of container
manager-data: # A storage volume for file persistence in the manager (can be used by services and protocols)
proxy-data: #Needed to persist SSL certificates to avoid excessive requests to Letsencrypt
services:
# Reverse proxy which auto-generates any Internet Assigned Numbers Authority TLD subdomain SSL certificates using
# Lets Encrypt the domain name to generate a certificate for should be specified using DOMAINNAME (single domain name)
# or DOMAINNAMES (multiple comma separated list of domain names). The proxy will fallback to self-signed certificate
# for any requests for which a certificate doesn't exist. Custom certificates can be volume mapped into
# /etc/haproxy/certs (note custom certificates must include the full chain including the private key). Can also volume
# map a custom proxy config file.
proxy:
image: openremote/proxy:${PROXY_VERSION:-develop}
restart: always
# volumes:
# - proxy-data:/deployment
environment:
# It is important that all services have the same timezone and are time synchronized.
# Bearer tokens are only valid for minutes, and authentication fails if Keycloak drifts.
TZ: ${TZ:-Europe/Amsterdam}
# File to which entrypoint logs are written in addition to std out
LOGFILE: ${PROXY_LOGFILE:-/var/log/proxy.log}
# Customize proxy log, defaults to 'notice', requests are logged at 'info'.
# Available levels are: emerg, alert, crit, err, warning, notice, info, debug
PROXY_LOGLEVEL: ${PROXY_LOGLEVEL:-notice}
# IANA TLD subdomain for which an SSL certificate should be requested (leave blank for private/externally
# generated certificates).
DOMAINNAME: ${OR_HOSTNAME:-127.0.0.1}
# IANA TLD comma separated subdomains for which an SSL certificates should be requested (leave blank for
# private/externally generated certificates); this is an alternative to DOMAINNAME for multiple domains.
DOMAINNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
# USE A CUSTOM PROXY CONFIG - COPY FROM https://raw.githubusercontent.com/openremote/proxy/main/haproxy.cfg
HAPROXY_CONFIG: ${HAPROXY_CONFIG:-/etc/haproxy/haproxy.cfg}
# Email address for SSL certificate issuance and expiration notifications.
LE_EMAIL: ${OR_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!)
# e.g. '--staging'
LE_EXTRA_ARGS: ${PROXY_EXTRA_ARGS:-}
# Provide this value if requesting wildcard certs with Route53 DNS zone; this should be the role to assume to
# perform route53 operations if calling across AWS accounts
AWS_ROUTE53_ROLE:
# Enable SISH HTTP tunnel forwarding
#SISH_HOST: sish
#SISH_PORT: 8090
# The proxy supports up to 10 custom redirects from hostname to any path on the
# manager service.
# e.g. PROXY_HOST_REDIRECT_1_NAME: www.my-console-master.tld
# PROXY_HOST_REDIRECT_1_TARGET: /console/master
PROXY_HOST_REDIRECT_1_NAME:
PROXY_HOST_REDIRECT_1_TARGET:
PROXY_HOST_REDIRECT_2_NAME:
PROXY_HOST_REDIRECT_2_TARGET:
PROXY_HOST_REDIRECT_3_NAME:
PROXY_HOST_REDIRECT_3_TARGET:
PROXY_HOST_REDIRECT_4_NAME:
PROXY_HOST_REDIRECT_4_TARGET:
PROXY_HOST_REDIRECT_5_NAME:
PROXY_HOST_REDIRECT_5_TARGET:
PROXY_HOST_REDIRECT_6_NAME:
PROXY_HOST_REDIRECT_6_TARGET:
PROXY_HOST_REDIRECT_7_NAME:
PROXY_HOST_REDIRECT_7_TARGET:
PROXY_HOST_REDIRECT_8_NAME:
PROXY_HOST_REDIRECT_8_TARGET:
PROXY_HOST_REDIRECT_9_NAME:
PROXY_HOST_REDIRECT_9_TARGET:
PROXY_HOST_REDIRECT_10_NAME:
PROXY_HOST_REDIRECT_10_TARGET:
# The proxy removes path prefixes when configured before sending the request to the manager or keycloak.
#MANAGER_PATH_PREFIX: /openremote
#KEYCLOAK_PATH_PREFIX: /keycloak
# Expose public services (web server, MQTT broker)
ports:
- "80:80" # HTTP for letsencrypt cert generation and in general it redirects to 443 for HTTPS
- "${OR_SSL_PORT:-443}:443" # HTTPS /auth directs to keycloak and other paths direct to manager
- "8883:8883" # MQTTS
- "127.0.0.1:8404:8404" # Local metrics access
- "${PRIVATE_IP:-127.0.0.1}:8404:8404" # Allows to also expose metrics on a given IP address,
# intended to be IP of the interface of the private subnet of the EC2 VM
# 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
# /deployment/manager/extensions - contains JARS to be loaded on the classpath
# /deployment/manager/provisioning - contains JSON files for provisioning the system
# /deployment/map/mapdata.mbtiles - map tile data
# /deployment/map/mapsettings.json - map styling
volumes:
- manager-data:/storage
# - deployment-data:/deployment
# - postgresql-data:/postgres
# - /var/run/dbus:/var/run/dbus # EXPOSE DBUS
# Expose any devices required by agents
#devices:
# - /dev/ttyACM0
#ports:
# - "8080:8080" # Web server port
# - "8000:8000" # Remote debugging port - NOT FOR PRODUCTION USE!!!
# - "8085:8085" # JMX port - FOR DIAGNOSTICS ONLY!!!
# - "127.0.0.1:8405:8405" # Local metrics access
# - "${PRIVATE_IP:-127.0.0.1}:8405:8405" # Allows to also expose metrics on a given IP address,
# intended to be IP of the interface of the private subnet of the EC2 VM
logging:
options:
# Use very little logging for container STDOUT, this is
# quick to view and download with Docker remote client
# and `docker logs -f`. If you want to tail the whole
# and larger, rotated file log, use instead:
#
# docker exec -it openremote_manager_1 tail -f /deployment/openremote.log.0
#
max-size: "1m"
environment:
# It is important that all services have the same timezone and are time synchronized.
# Bearer tokens are only valid for minutes, and authentication fails if Keycloak drifts
TZ: ${TZ:-Europe/Amsterdam}
# The password for the super user (admin) of the master realm (must match keycloak password if using
# the keycloak identity provider).
OR_ADMIN_PASSWORD: ${OR_ADMIN_PASSWORD:-secret}
# This value is passed to SetupTasks can be used to determine what assets etc. should be setup for this deployment
# the available values and general use of this is dependent on the actual SetupTasks available in the instance
# being deployed some basic recommendations are 'production', 'staging'
OR_SETUP_TYPE:
# The public HOSTNAME and SSL PORT of this manager
OR_SSL_PORT: ${OR_SSL_PORT:--1}
OR_HOSTNAME: ${OR_HOSTNAME:-127.0.0.1}
# Additional hostnames that should be allowed to access the auth server
OR_ADDITIONAL_HOSTNAMES:
# Configure Email, SMTP server to send password reset emails etc.
OR_EMAIL_HOST:
OR_EMAIL_USER:
OR_EMAIL_PASSWORD:
OR_EMAIL_PORT:
OR_EMAIL_TLS:
OR_EMAIL_X_HEADERS: # Headers to set on all outbound emails
OR_EMAIL_PROTOCOL: # smtp or smtps for SSL (if TLS not set or is true then smtp is assumed)
# Optional oAuth2 configuration to use instead of username/password
OR_EMAIL_OAUTH2_URL: # url to request an access token
OR_EMAIL_OAUTH2_CLIENT_ID:
OR_EMAIL_OAUTH2_CLIENT_SECRET:
# Where to send admin emails to
OR_EMAIL_ADMIN:
# From address for emails sent by the system
OR_EMAIL_FROM:
# Console applications can register for push notifications through FCM.
OR_FIREBASE_CONFIG_FILE: ${OR_FIREBASE_CONFIG_FILE:-/deployment/manager/fcm.json}
# Configure the central instance for Gateway SSH tunnelling (if these are set then gateway tunnelling support is enabled on the central instance)
OR_GATEWAY_TUNNEL_SSH_HOSTNAME:
OR_GATEWAY_TUNNEL_SSH_PORT:
# Use a different hostname to the central manager instance
OR_GATEWAY_TUNNEL_HOSTNAME:
OR_GATEWAY_TUNNEL_TCP_START: # First TCP port that can be allocated for raw TCP connections (should be start of an assigned contiguous block e.g. 9000-10000 = 9000)
# Configure the edge instance for Gateway SSH tunnelling (if SSH_KEY_FILE is set ten gateway tunnelling support is enabled on te edge instance)
OR_GATEWAY_TUNNEL_SSH_KEY_FILE: # SSH key file in RSA (not openSSH) format (use ssh-keygen -p -f ~/.ssh/id_rsa -m pem) to convert from openSSH
OR_GATEWAY_TUNNEL_LOCALHOST_REWRITE: # Override default rewriting of localhost/127.0.0.1 tunnelling to work within Docker
# Developer mode (see code for usages of OR_DEV_MODE flag)
OR_DEV_MODE: ${OR_DEV_MODE:-false}
# !! WARNING: This will wipe your database !!
# Force a full clean and setup on startup irrespective of whether there is existing data
# Default behaviour is false unless OR_DEV_MODE = true or openremote database doesn't already exist
OR_SETUP_RUN_ON_RESTART: ${OR_SETUP_RUN_ON_RESTART:-false}
# Manager web server interface binding; default: 0.0.0.0
OR_WEBSERVER_LISTEN_HOST: ${OR_WEBSERVER_LISTEN_HOST:-0.0.0.0}
# Manager web server port (default: 8080)
OR_WEBSERVER_LISTEN_PORT: ${OR_WEBSERVER_LISTEN_PORT:-8080}
# Comma separated list of manager web server CORS allowed origins (can be a prefix, exact match or wildcard *)
# These are in addition to the OR_HOSTNAME and OR_ADDITIONAL_HOSTNAMES which are implicitly allowed
OR_WEBSERVER_ALLOWED_ORIGINS:
# Dump web server requests to logs; default: false
OR_WEBSERVER_DUMP_REQUESTS:
# Manager web server maximum worker thread count; default: Processor core count or 10
OR_WEBSERVER_WORKER_THREADS_MAX:
# Manager web server maximum IO thread count; default: Processor core count or 2
OR_WEBSERVER_IO_THREADS_MAX:
# Manager web server max request entity size in bytes; default: 30000000
OR_WEBSERVER_MAX_ENTITY_SIZE:
# Manager web server max multipart request entity size in bytes; default: 30000000
OR_WEBSERVER_MULTIPART_MAX_ENTITY_SIZE:
# Database settings
OR_DB_VENDOR: ${OR_DB_VENDOR:-postgres}
OR_DB_HOST: ${OR_DB_HOST:-postgresql}
OR_DB_PORT: ${OR_DB_PORT:-5432}
OR_DB_NAME: ${OR_DB_NAME:-openremote}
OR_DB_SCHEMA: ${OR_DB_SCHEMA:-openremote}
OR_DB_USER: ${OR_DB_USER:-postgres}
OR_DB_PASSWORD: ${OR_DB_PASSWORD:-postgres}
OR_DB_POOL_MIN_SIZE: ${OR_DB_POOL_MIN_SIZE:-5}
OR_DB_POOL_MAX_SIZE: ${OR_DB_POOL_MAX_SIZE:-20}
OR_DB_CONNECTION_TIMEOUT_SECONDS: ${OR_DB_CONNECTION_TIMEOUT_SECONDS:-300}
# Allow migration scripts to be applied out of order (see flyway DB docs)
OR_DB_FLYWAY_OUT_OF_ORDER:
# The service-internal host name and port of the keycloak identity provider; defaults:
OR_KEYCLOAK_HOST: ${OR_KEYCLOAK_HOST:-keycloak}
OR_KEYCLOAK_PORT: ${OR_KEYCLOAK_PORT:-8080}
OR_KEYCLOAK_PATH: ${OR_KEYCLOAK_PATH:-auth}
# Keycloak public URI (only set this if keycloak is not on the same base URI as the manager i.e. not accessible at /auth)
OR_KEYCLOAK_PUBLIC_URI:
# Disable keycloak issuer validation, set this on edge gateway instances for tunneling to work (DO NOT USE THIS SETTING IN PUBLICLY EXPOSED DEPLOYMENTS)
OR_KEYCLOAK_DISABLE_ISSUER_VALIDATION:
# Location of built in web content.
OR_APP_DOCROOT: ${OR_APP_DOCROOT:-/opt/web}
# Location of the custom web content.
OR_CUSTOM_APP_DOCROOT: ${OR_CUSTOM_APP_DOCROOT:-/deployment/manager/app}
# Location for the provisioning files
OR_PROVISIONING_DOCROOT: ${OR_PROVISIONING_DOCROOT:-/deployment/manager/provisioning}
# Redirect path when root URI is requested
OR_ROOT_REDIRECT_PATH: ${OR_ROOT_REDIRECT_PATH:-/manager}
# Map related settings.
# Provide a path to the map tiles database file (see https://openmaptiles.com/).
OR_MAP_TILES_PATH: ${OR_MAP_TILES_PATH:-/deployment/map/mapdata.mbtiles}
# Override the map settings such as center location and zoom when opening the
# manager's map, as well as other style details and colours.
OR_MAP_SETTINGS_PATH: ${OR_MAP_SETTINGS_PATH:-/deployment/map/mapsettings.json}
# Override the maximum allowed custom map tiles database file size in bytes.
OR_CUSTOM_MAP_SIZE_LIMIT: ${OR_CUSTOM_MAP_SIZE_LIMIT:-30000000}
# Set the tileserver host name and port; the manager will reverse proxy to this server
# to provide raster map tiles to frontend apps
OR_MAP_TILESERVER_HOST:
OR_MAP_TILESERVER_PORT: ${OR_MAP_TILESERVER_PORT:-8082}
OR_MAP_TILESERVER_REQUEST_TIMEOUT: ${OR_MAP_TILESERVER_REQUEST_TIMEOUT:-10000}
# Override logging.properties with a file of your choice; if not set then defaults
# to embedded logging.properties or logging-dev.properties (if OR_DEV_MODE=true)
OR_LOGGING_CONFIG_FILE:
# The number of threads to be used for the scheduled executor service which can be used for scheduling
# non-blocking, short-lived tasks in a standard way; defaults to number of CPU cores.
OR_SCHEDULED_EXECUTOR_THREADS:
# The number of threads (min and max) to be used for the executor service which can be used for executing
# tasks in a standard way; defaults to number of CPU cores and number of CPU cores x 10 respectively.
OR_EXECUTOR_THREADS_MIN:
OR_EXECUTOR_THREADS_MAX:
# Enable/disable execution of Groovy rulesets; when disabled they can still be created, edited and deleted
# but will not be compiled or executed by the manager.
OR_RULES_GROOVY_EXECUTION_ENABLED: ${OR_RULES_GROOVY_EXECUTION_ENABLED:-true}
# The minimum number of threads that will be used to process incoming auto provisioning messages
OR_AUTO_PROVISIONING_THREADS_MIN:
# The maximum number of threads that will be used to process incoming auto provisioning messages
OR_AUTO_PROVISIONING_THREADS_MAX:
# The identity provider implementation to use for managing user identities, roles, and
# access authorization. The default is 'keycloak' which requires a separate service but
# provides full multi-tenancy identity, role permissions, and user session timeouts.
OR_IDENTITY_PROVIDER: ${OR_IDENTITY_PROVIDER:-keycloak}
# For the Keycloak identity provider, you may configure session timeouts of frontend apps. This
# will only be applied on newly created realms, or once on the master realm when clean setup runs.
# Validity of non-offline refresh tokens, force login when expired on web app, default is 1 day.
OR_IDENTITY_SESSION_MAX_MINUTES: ${OR_IDENTITY_SESSION_MAX_MINUTES:-1440}
# Validity of offline refresh tokens, force login on native console app, default is 5 years.
# Note that production offline tokens should be valid for months or years: When the offline token
# expires, the native console app can no longer contact the service in the background (e.g. when
# processing push notifications) and will therefore fail silently until the user logs in again.
OR_IDENTITY_SESSION_OFFLINE_TIMEOUT_MINUTES: ${OR_IDENTITY_SESSION_OFFLINE_TIMEOUT_MINUTES:-2628000}
# Enable/disable Prometheus metrics collection
OR_METRICS_ENABLED: ${OR_METRICS_ENABLED:-true}
# Web server port used to host metrics endpoint
OR_METRICS_PORT: ${OR_METRICS_PORT:-8405}
# Set the number of concurrent attribute event processors (defaults to number of CPU cores)
OR_ATTRIBUTE_EVENT_THREADS:
# Opt-in OpenTelemetry tracing. The Java agent is packaged in the manager image but is only attached when
# explicitly enabled. Set OTEL_EXPORTER_OTLP_ENDPOINT outside this file; for an Alloy service in this Compose
# project it will usually be http://alloy-otel:4318.
OTEL_JAVAAGENT_ENABLED: ${OTEL_JAVAAGENT_ENABLED:-false}
OTEL_SERVICE_NAME: ${OTEL_SERVICE_NAME:-openremote-manager}
OTEL_TRACES_EXPORTER: ${OTEL_TRACES_EXPORTER:-otlp}
OTEL_EXPORTER_OTLP_ENDPOINT:
OTEL_EXPORTER_OTLP_PROTOCOL: ${OTEL_EXPORTER_OTLP_PROTOCOL:-http/protobuf}
# This integration is traces-only; existing Prometheus metrics and application logging remain unchanged.
OTEL_METRICS_EXPORTER: ${OTEL_METRICS_EXPORTER:-none}
OTEL_LOGS_EXPORTER: ${OTEL_LOGS_EXPORTER:-none}
OTEL_INSTRUMENTATION_COMMON_DB_STATEMENT_SANITIZER_ENABLED: "true"
# Set the persistence storage dir (must also be volume mapped)
OR_STORAGE_DIR:
# Set the path to the keycloak credentials grant file generated at setup to allow the manager to communicate with
# the Keycloak admin API; this means OR_ADMIN_PASSWORD can be changed without breaking connection to Keycloak
# relative paths are resolved relative to OR_STORAGE_DIR
OR_KEYCLOAK_GRANT_FILE:
# Configure the max age in weeks for data points stored in the database; data points are kept indefinitely when
# not set. The deprecated OR_DATA_POINTS_MAX_AGE_DAYS is still used (rounded up to weeks) when this is not set.
# OR_DATA_POINTS_MAX_AGE_WEEKS: 4
# Configure the limit of data points that can be queried.
# Defaults to 100.000. When set to 0, it disables the limit.
# OR_DATA_POINTS_QUERY_LIMIT: 100000
# Configure the limit of data points that can be exported to CSV. Defaults to 1 million data points.
# OR_DATA_POINTS_EXPORT_LIMIT: 10000000
# App id for the API of OpenWeather: https://openweathermap.org
# OR_OPEN_WEATHER_API_APP_ID
# API key for the API of ForecastSolar: https://forecast.solar
# OR_FORECAST_SOLAR_API_KEY
# When using path based proxying this prefix is added to the URLs returned via the REST API.
# OR_PATH_PREFIX: /openremote
# Custom JVM options (override default manager options or append using JAVA_OPTS_APPEND)
#JAVA_OPTS:
#JAVA_OPTS_APPEND:
#
# THE FOLLOWING OPTIONS CAN BE USED TO ENABLE JMX; PORT MUST ALSO BE EXPOSED
# ACCESS SHOULD BE RESTRICTED BY FIREWALL TO SPECIFIC IPs FOR DIAGNOSTIC PURPOSES
#
#JAVA_TOOL_OPTIONS: -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=8085 -Dcom.sun.management.jmxremote.rmi.port=8085 -Djava.rmi.server.hostname=${OR_HOSTNAME:-127.0.0.1}
#
# Custom JVM tool options (for remote debugging)
#JAVA_TOOL_OPTIONS: '-agentlib:jdwp=transport=dt_socket,address=0.0.0.0:8000,server=y,suspend=n'
# Keycloak identity provider
keycloak:
image: openremote/keycloak:${KEYCLOAK_VERSION:-develop}
restart: always
#volumes:
# Map custom themes for theme development
# - /path/to/theme/src/main/resources/theme/openremote:/opt/keycloak/themes/dev
#ports:
# - "8081:8080" # Web server port
environment:
# It is important that all services are time synchronized. Bearer tokens are
# only valid for minutes, and authentication fails if Keycloak drifts
TZ: ${TZ:-Europe/Amsterdam}
# Switch to debug to diagnose Keycloak problems; default:
KC_LOG_LEVEL: ${KC_LOG_LEVEL:-info}
# Configure how Keycloak connects to the database
KC_DB_URL_HOST: ${KC_DB_URL_HOST:-postgresql}
KC_DB_URL_PORT: ${KC_DB_URL_PORT:-5432}
KC_DB_URL_DATABASE: ${KC_DB_URL_DATABASE:-openremote}
KC_DB_SCHEMA: ${KC_DB_SCHEMA:-public}
KC_DB_USERNAME: ${KC_DB_USERNAME:-postgres}
KC_DB_PASSWORD: ${KC_DB_PASSWORD:-postgres}
KC_DB_POOL_INITIAL_SIZE:
KC_DB_POOL_MIN_SIZE:
KC_DB_POOL_MAX_SIZE: ${KC_DB_POOL_MAX_SIZE:-20}
# Configure web server (Can be a full URL, or just a hostname. When only hostname is provided, scheme, port and context path are resolved from the request)
#KC_HOSTNAME: https://${OR_HOSTNAME:-127.0.0.1}/auth
# Set this on edge gateway instances for tunneling to work (DO NOT USE THIS SETTING IN PUBLICLY EXPOSED DEPLOYMENTS)
KC_HOSTNAME_STRICT: false
KC_HOSTNAME_DEBUG: true
# Set the following for edge gateways not directly exposed to the internet
#KC_HOSTNAME_STRICT: false
#KC_HOSTNAME_ADMIN: ${KC_HOSTNAME_ADMIN:-}
#KC_HTTP_ENABLED: ${KC_HTTP_ENABLED:-true}
#KC_PROXY_HEADERS: ${KC_PROXY_HEADERS:-xforwarded}
# Configure main user credentials (only on first startup)
KC_BOOTSTRAP_ADMIN_PASSWORD: ${OR_ADMIN_PASSWORD:-secret}
# Custom startup options (see keycloak documentation)
KEYCLOAK_START_COMMAND:
KEYCLOAK_START_OPTS:
# Origin of the manager whose manager_config.json the login theme reads each realm's
# branding from (logo, application title, brand color, favicon). Empty means the origin
# that served the login page, which is what the proxy gives you: it serves the manager at
# / and keycloak at /auth. Set it where keycloak has an origin of its own, as it does in
# the dev profiles. A deployment that sets it also needs the keycloak origin in the
# manager's OR_WEBSERVER_ALLOWED_ORIGINS, unless the manager is in dev mode.
OR_MANAGER_URL: ${OR_MANAGER_URL:-}
# Configuration for roles to be assigned to self-registered users (when the listener is enabled)
# Example is "{\"realmRoles\":[\"restricted_user\"],\"clientRoles\":[{\"client\":\"openremote\",\"roles\":[\"read:assets\",\"write:attributes\"]}]}"
KEYCLOAK_SELF_REGISTERED_USER_ROLES: "{ }"
# Custom JVM options (increase heap size if required)
JAVA_OPTS: ${KEYCLOAK_JAVA_OPTS:-}
# PostgreSQL DBMS
postgresql:
image: openremote/postgresql:${POSTGRESQL_VERSION:-develop-slim}
restart: always
# RAM limits and PostgreSQL memory settings should be set appropriately for the expected load (see documentation)
shm_size: ${OR_DB_SHM:-156mb}
deploy:
resources:
limits:
memory: ${OR_DB_RAM:-512M}
command:
- postgres
- -c
- shared_buffers=${OR_DB_SHARED_BUFFERS:-128MB}
- -c
- effective_cache_size=${OR_DB_CACHE_SIZE:-384MB}
- -c
- maintenance_work_mem=${OR_DB_MAINTENANCE_WORK_MEM:-56MB}
- -c
- work_mem=${OR_DB_WORK_MEM:-4MB}
# Docker volume for persistent storage of DB; can alternatively map to host
#volumes:
# - postgresql-data:/var/lib/postgresql/data
#ports:
# - "5432:5432" # DB server
environment:
# It is important that all services have the same timezone and are time synchronized.
# Bearer tokens are only valid for minutes, and authentication fails if Keycloak drifts.
TZ: ${TZ:-Europe/Amsterdam}
PGTZ: ${PGTZ:-Europe/Amsterdam}
# Database settings
POSTGRES_DB: ${OR_DB_NAME:-openremote}
POSTGRES_USER: ${OR_DB_USER:-postgres}
POSTGRES_PASSWORD: ${OR_DB_PASSWORD:-postgres}
# This setting may still be overridden depending on your kernel settings so tune this and other
# service DB values so the actual max connections are not exhausted
POSTGRES_MAX_CONNECTIONS: ${POSTGRES_MAX_CONNECTIONS:-50}
# Query Exporter - Prometheus metrics from PostgreSQL queries
# Documentation: https://github.com/albertodonato/query-exporter
query-exporter:
image: adonato/query-exporter:latest
restart: always
depends_on:
postgresql:
condition: service_healthy
manager:
condition: service_healthy
volumes:
# Mount deployment-data volume containing config.yaml for query-exporter configuration
# Config file should be at: /deployment/query-exporter/config.yaml
- deployment-data:/deployment
ports:
- "127.0.0.1:8406:9560" # Local metrics access
- "${PRIVATE_IP:-127.0.0.1}:8406:9560" # Allows to also expose metrics on a given IP address,
# intended to be IP of the interface of the private subnet of the EC2 VM
environment:
TZ: ${TZ:-Europe/Amsterdam}
# Database connection settings (matches postgresql service)
# These can be referenced in the config.yaml file using !env tag
POSTGRES_HOST: ${OR_DB_HOST:-postgresql}
POSTGRES_PORT: ${OR_DB_PORT:-5432}
POSTGRES_DB: ${OR_DB_NAME:-openremote}
POSTGRES_USER: ${OR_DB_USER:-postgres}
POSTGRES_PASSWORD: ${OR_DB_PASSWORD:-postgres}
QE_CONFIG: /deployment/query-exporter/config.yaml
# Map tile server
tileserver:
image: openremote/tileserver:${TILESERVER_VERSION:-latest}
restart: always
#ports:
# - "8082:80" # Web server port
sish:
image: antoniomika/sish:latest
depends_on:
- proxy
healthcheck:
test: ["CMD", "/app/app", "-v"]
ports:
- "2222:2222"
- "9000-9100:9000-9100"
volumes:
- proxy-data:/etc/letsencrypt
- deployment-data:/deployment
#--https-request-port-override=8443
#--https-certificate-directory=
command: |
--ssh-address=:2222
--http-address=:8090
--https=false
--verify-ssl=false
--idle-connection=false
--authentication-keys-directory=/deployment/sish/pubkeys
--private-keys-directory=/deployment/sish/keys
--port-bind-range="9000-9100"
--bind-random-ports=false
--bind-random-subdomains=false
--domain=${OR_HOSTNAME}
--force-requested-subdomains=true
restart: always