Hi,
I have run successfully the manager in local following next steps:
1: ./gradlew clean installDist
2: docker build -t openremote/manager:latest openremote/manager/build/install/manager (to use the latest built local image)
3. I have modified a little bit the yml to take custom configurations under deployment directory.
Modification under #AGG START and # AGG END tags. This is my dev-ui.yml:
# OpenRemote v3
#
# Profile for doing UI development work.
#
# Please see profile/deploy.yml for configuration details for each service.
#
version: '2.4'
volumes:
manager-data:
services:
keycloak:
extends:
file: ../openremote/profile/deploy.yml
service: keycloak
volumes:
# Map custom themes
- ../deployment:/deployment
# Access directly if needed on localhost
ports:
- "8081:8080"
depends_on:
postgresql:
condition: service_healthy
environment:
KC_HOSTNAME: ${OR_HOSTNAME:-localhost}
KC_HOSTNAME_STRICT_HTTPS: 'false'
KC_HOSTNAME_PORT: ${KC_HOSTNAME_PORT:-8080}
# Prevent theme caching during dev
KEYCLOAK_START_OPTS: --spi-theme-static-max-age=-1 --spi-theme-cache-themes=false --spi-theme-cache-templates=false
postgresql:
extends:
file: ../openremote/profile/deploy.yml
service: postgresql
volumes:
- manager-data:/storage
# Access directly if needed on localhost
ports:
- "5432:5432"
manager:
extends:
file: ../openremote/profile/deploy.yml
service: manager
depends_on:
postgresql:
condition: service_healthy
volumes:
- manager-data:/storage
#AGG START - To use local cofigurations
#- ../deployment/build/image:/deployment
- ../deployment:/deployment
#AGG END
environment:
OR_SETUP_RUN_ON_RESTART: ${OR_SETUP_RUN_ON_RESTART:-true}
OR_DEV_MODE: ${OR_DEV_MODE:-true}
KC_HOSTNAME_PORT: ${KC_HOSTNAME_PORT:-8080}
MAP_TILES_PATH: ../deployment/map/mapdata.mbtiles
MAP_SETTINGS_PATH: ../deployment/map/mapsettings.json
ports:
- "8080:8080"
- docker-compose -f profile/dev-ui.yml up --build -d
- npm run serve – --env config=…/…/…/…/deployment/manager/app
under ./openremote/ui/app/manager
AND IT WORKS as expected in http://localhost:8080
But now, I want to use the proxy and data containers, I am not able to run:
- FIRST ATTEMP:
Modifying the docker-compose.yml removing logs to AWS and following the steps on the top of file:
# OpenRemote v3
#
# Profile for deploying the custom stack; uses deployment-data named volume
# to expose customisations to the manager and keycloak images. To run this profile you need to specify the following
# environment variables:
#
# OR_ADMIN_PASSWORD - Initial admin user password
# OR_HOSTNAME - FQDN hostname of where this instance will be exposed (localhost, IP address or public domain)
# DEPLOYMENT_VERSION - Tag to use for deployment image (must match the tag used when building the deployment image)
#
# Please see openremote/profile/deploy.yml for configuration details for each service.
#
# To perform updates, build code and prepare Docker images:
#
# ./gradlew clean installDist
#
# Then recreate deployment image:
#
# DEPLOYMENT_VERSION=$(git rev-parse --short HEAD)
# MANAGER_VERSION=$(cd openremote; git rev-parse --short HEAD; cd ..)
# docker build -t openremote/manager:$MANAGER_VERSION ./openremote/manager/build/install/manager/
# docker build -t openremote/custom-deployment:$DEPLOYMENT_VERSION ./deployment/build/
# docker-compose -p custom down
# docker volume rm custom_deployment-data
# Do the following volume rm command if you want a clean install (wipe all existing data)
# docker volume rm custom_postgresql-data
# OR_ADMIN_PASSWORD=secret OR_HOSTNAME=my.domain.com docker-compose -p custom up -d
#
# All data is kept in volumes. Create a backup of the volumes to preserve data.
#
But I used MANAGER_VERSION=latest for using local image
When I execute:
OR_ADMIN_PASSWORD=secret OR_HOSTNAME=localhost DEPLOYMENT_VERSION=$DEPLOYMENT_VERSION docker-compose -p custom up -d
I get following error:
Error response from daemon: pull access denied for openremote/deployment, repository does not exist or may require ‘docker login’: denied: requested access to the resource is denied
XXXX@XXXXXXXXX %
- SECOND ATTEMP:
I have used following docker-compose.yml:
# OpenRemote v3
#
# Profile that runs the stack by default on https://localhost using a self-signed SSL certificate,
# but optionally on https://$OR_HOSTNAME with an auto generated SSL certificate from Letsencrypt.
#
# It is configured to use the AWS logging driver.
#
version: '2.4'
volumes:
proxy-data:
manager-data:
postgresql-data:
services:
proxy:
image: openremote/proxy:${PROXY_VERSION:-latest}
restart: always
depends_on:
manager:
condition: service_healthy
ports:
- "80:80" # Needed for SSL generation using letsencrypt
- "${OR_SSL_PORT:-443}:443"
- "8883:8883"
#- "127.0.0.1:8404:8404" # Localhost metrics access
volumes:
- proxy-data:/deployment
environment:
LE_EMAIL: ${OR_EMAIL_ADMIN:-}
DOMAINNAME: ${OR_HOSTNAME:-localhost}
DOMAINNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
postgresql:
restart: always
image: openremote/postgresql:${POSTGRESQL_VERSION:-latest}
volumes:
- postgresql-data:/var/lib/postgresql/data
- manager-data:/storage
keycloak:
restart: always
image: openremote/keycloak:${KEYCLOAK_VERSION:-latest}
depends_on:
postgresql:
condition: service_healthy
volumes:
- ./deployment:/deployment
environment:
KEYCLOAK_ADMIN_PASSWORD: ${OR_ADMIN_PASSWORD:-secret}
KC_HOSTNAME: ${OR_HOSTNAME:-localhost}
KC_HOSTNAME_PORT: ${OR_SSL_PORT:--1}
manager:
restart: always
image: openremote/manager:${MANAGER_VERSION:-latest}
depends_on:
keycloak:
condition: service_healthy
#ports:
# - "127.0.0.1:8405:8404" # Localhost metrics access
environment:
OR_SETUP_TYPE:
OR_ADMIN_PASSWORD:
OR_SETUP_RUN_ON_RESTART:
OR_EMAIL_HOST:
OR_EMAIL_USER:
OR_EMAIL_PASSWORD:
OR_EMAIL_X_HEADERS:
OR_EMAIL_FROM:
OR_EMAIL_ADMIN:
OR_HOSTNAME: ${OR_HOSTNAME:-localhost}
OR_ADDITIONAL_HOSTNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
OR_SSL_PORT: ${OR_SSL_PORT:--1}
OR_DEV_MODE: ${OR_DEV_MODE:-false}
WEBSERVER_LISTEN_HOST: 0.0.0.0
IDENTITY_NETWORK_WEBSERVER_PORT: 443
IDENTITY_NETWORK_SECURE: true
volumes:
- manager-data:/storage
- ./deployment:/deployment
Then I execute:
OR_ADMIN_PASSWORD=secret OR_HOSTNAME=localhost docker-compose -p custom up -d
And it seems that It use local manager and remote deployment:
But when I go to https://localhost a blank page appears with following messages in console:
Any idea? Because I have tried tens of different docker-compose configurations: