Skip to content

armgit / core

Public Imported from GitHub
0

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

Feature/workflows (#623)

Rich Turner49c76361b5ac
diff --git a/.ci_cd/deploy.sh b/.ci_cd/deploy.sh
index 479183327..9fedea5af 100644
--- a/.ci_cd/deploy.sh
+++ b/.ci_cd/deploy.sh
@@ -19,7 +19,7 @@ if [ -z "$HOST" ]; then
exit 1
fi
-if [ ! -z "$ENV_COMPOSE_FILE" ]; then
+if [ -z "$ENV_COMPOSE_FILE" ]; then
if [ -f "profile/$ENVIRONMENT.yml" ]; then
cp "profile/$ENVIRONMENT.yml" temp/docker-compose.yml
elif [ -f "docker-compose.yml" ]; then
diff --git a/.ci_cd/env/.env b/.ci_cd/env/.env
index 809650c3b..7f4bb69fd 100644
--- a/.ci_cd/env/.env
+++ b/.ci_cd/env/.env
@@ -1,2 +1,3 @@
CLEAN_INSTALL=true
SETUP_WIPE_CLEAN_INSTALL=true
+ENV_COMPOSE_FILE=profile/demo.yml
diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml
index 0157f8a1d..8b99f4dd2 100644
--- a/.github/workflows/ci_cd.yml
+++ b/.github/workflows/ci_cd.yml
@@ -76,10 +76,11 @@ jobs:
if inputs is not None and inputs != '':
inputs = json.loads(inputs)
if secrets is not None and secrets != '':
- secrets = json.loads(secrets)
-
- if callerInputs is not None and callerInputs != '':
+ secrets = json.loads(secrets)
+ if callerInputs is not None and callerInputs != 'null':
+ os.system(f"echo 'Processing caller inputs'")
inputs = json.loads(callerInputs)
+
if inputs is not None and 'INPUTS' in inputs:
os.system("echo 'Processing inputs from caller'")
inputs = json.loads(inputs['INPUTS'])
diff --git a/profile/demo.yml b/profile/demo.yml
new file mode 100644
index 000000000..f8797d38b
--- /dev/null
+++ b/profile/demo.yml
@@ -0,0 +1,93 @@
+# OpenRemote v3
+#
+# Profile that runs the stack by default on https://localhost using a self-signed SSL certificate,
+# but optionally on https://$HOST with an auto generated SSL certificate from Letsencrypt.
+#
+# It is possible to specify SETUP_TYPE=demo to pre-populate the system with a set of demo assets, rules, etc. (as
+# is shown at https://demo.openremote.io)
+# with username 'admin' and password 'secret'. There is no map data available in the vanilla
+# system so the map tile server will not function. Persistent data is stored in a docker
+# volume called postgresql-data between restarts, simply delete this volume to reset the
+# system to an empty state.
+#
+# Please see profile/deploy.yml for configuration details for each service.
+#
+version: '2.4'
+
+volumes:
+ proxy-data:
+ temp-data:
+ postgresql-data:
+ deployment-data:
+
+services:
+
+ deployment:
+ build: '../deployment'
+ image: openremote/deployment:latest
+ volumes:
+ - deployment-data:/deployment
+
+ proxy:
+ image: openremote/proxy:${PROXY_VERSION:-2.5.0.1}
+ restart: always
+ depends_on:
+ manager:
+ condition: service_healthy
+ ports:
+ - "80:80"
+ - "443:443"
+ - "8883:8883"
+ volumes:
+ - proxy-data:/deployment
+ environment:
+ 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'
+
+ postgresql:
+ restart: always
+ image: openremote/postgresql:${POSTGRESQL_VERSION:-14.1.0.1}
+ volumes:
+ - postgresql-data:/var/lib/postgresql/data
+ - temp-data:/tmp
+
+ keycloak:
+ restart: always
+ image: openremote/keycloak:${KEYCLOAK_VERSION:-16.0.0.0}
+ depends_on:
+ postgresql:
+ condition: service_healthy
+ volumes:
+ - ./deployment:/deployment
+ environment:
+ KEYCLOAK_PASSWORD: ${SETUP_ADMIN_PASSWORD:-secret}
+ KEYCLOAK_FRONTEND_URL: https://${HOST:-localhost}/auth
+
+ manager:
+ restart: always
+ image: openremote/manager:${MANAGER_VERSION:-latest}
+ depends_on:
+ keycloak:
+ condition: service_healthy
+ environment:
+ # Set this variable `demo` to auto provision demo assets etc.
+ SETUP_TYPE:
+ SETUP_ADMIN_PASSWORD:
+ SETUP_WIPE_CLEAN_INSTALL:
+ SETUP_EMAIL_HOST:
+ SETUP_EMAIL_USER:
+ SETUP_EMAIL_PASSWORD:
+ SETUP_EMAIL_FROM:
+ SETUP_EMAIL_ADMIN:
+ EXTERNAL_URL: https://${HOST:-localhost}
+ DEV_MODE:
+ # The following variables will configure the demo
+ FORECAST_SOLAR_API_KEY:
+ OPEN_WEATHER_API_APP_ID:
+ SETUP_IMPORT_DEMO_AGENT_KNX:
+ SETUP_IMPORT_DEMO_AGENT_VELBUS:
+ volumes:
+ - temp-data:/tmp
+ - deployment-data:/deployment