Skip to content

armgit / core

Public Imported from GitHub
0

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

Minor: CI/CD adjustments

Rich Turner45ecd5b9e661
diff --git a/.ci_cd/aws/cloudformation-create-ec2.yml b/.ci_cd/aws/cloudformation-create-ec2.yml
index 99a8cc6a3..89afcf1d0 100644
--- a/.ci_cd/aws/cloudformation-create-ec2.yml
+++ b/.ci_cd/aws/cloudformation-create-ec2.yml
@@ -89,6 +89,7 @@ Resources:
CloudFormationLogs:
Type: AWS::Logs::LogGroup
Properties:
+ LogGroupName: !Ref Host
RetentionInDays: 7
StandardSecurityGroup:
diff --git a/docker-compose.yml b/docker-compose.yml
index 7b9ea34db..7e5c4c553 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -3,14 +3,7 @@
# 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 possible to specify OR_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.
+# It is configured to use the AWS logging driver.
#
version: '2.4'
@@ -20,6 +13,15 @@ volumes:
postgresql-data:
btmesh-data:
+x-logging: &awslogs
+ logging:
+ driver: awslogs
+ options:
+ awslogs-region: ${AWS_REGION:-eu-west-1}
+ awslogs-group: ${OR_HOSTNAME}
+ awslogs-create-group: 'true'
+ tag: "{{.Name}}/{{.ID}}"
+
services:
proxy:
@@ -40,13 +42,15 @@ services:
DOMAINNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
# USE A CUSTOM PROXY CONFIG - COPY FROM https://github.com/openremote/proxy/blob/main/haproxy.cfg
#HAPROXY_CONFIG: '/data/proxy/haproxy.cfg'
-
+ <<: *awslogs
+
postgresql:
restart: always
image: openremote/postgresql:${POSTGRESQL_VERSION:-latest}
volumes:
- postgresql-data:/var/lib/postgresql/data
- temp-data:/tmp
+ <<: *awslogs
keycloak:
restart: always
@@ -61,7 +65,8 @@ services:
KEYCLOAK_FRONTEND_URL: https://${OR_HOSTNAME:-localhost}/auth
# Use the following if OR_SSL_PORT is not the default 443
#KEYCLOAK_FRONTEND_URL: https://${OR_HOSTNAME:-localhost}:${OR_SSL_PORT:-443}/auth
-
+ <<: *awslogs
+
manager:
# privileged: true
restart: always
@@ -70,7 +75,6 @@ services:
keycloak:
condition: service_healthy
environment:
- # Set this variable to `demo` to auto provision demo assets etc.
OR_SETUP_TYPE:
OR_ADMIN_PASSWORD:
OR_SETUP_RUN_ON_RESTART:
@@ -98,4 +102,4 @@ services:
# - btmesh-data:/btmesh
# devices:
# - /dev/ttyACM0:/dev/ttyS0
-
+ <<: *awslogs
diff --git a/profile/demo.yml b/profile/demo.yml
index 06ddb7df4..7d3b9bea5 100644
--- a/profile/demo.yml
+++ b/profile/demo.yml
@@ -20,6 +20,15 @@ volumes:
postgresql-data:
deployment-data:
+x-logging: &awslogs
+ logging:
+ driver: awslogs
+ options:
+ awslogs-region: ${AWS_REGION:-eu-west-1}
+ awslogs-group: ${OR_HOSTNAME}
+ awslogs-create-group: 'true'
+ tag: "{{.Name}}/{{.ID}}"
+
services:
deployment:
@@ -45,13 +54,15 @@ services:
DOMAINNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
# USE A CUSTOM PROXY CONFIG - COPY FROM https://github.com/openremote/proxy/blob/main/haproxy.cfg
#HAPROXY_CONFIG: '/data/proxy/haproxy.cfg'
-
+ <<: *awslogs
+
postgresql:
restart: always
image: openremote/postgresql:${POSTGRESQL_VERSION:-latest}
volumes:
- postgresql-data:/var/lib/postgresql/data
- temp-data:/tmp
+ <<: *awslogs
keycloak:
restart: always
@@ -64,7 +75,8 @@ services:
environment:
KEYCLOAK_PASSWORD: ${OR_ADMIN_PASSWORD?OR_ADMIN_PASSWORD must be set}
KEYCLOAK_FRONTEND_URL: https://${OR_HOSTNAME:-localhost}/auth
-
+ <<: *awslogs
+
manager:
restart: always
image: openremote/manager:${MANAGER_VERSION:-latest}
@@ -94,3 +106,5 @@ services:
volumes:
- temp-data:/tmp
- deployment-data:/deployment
+ <<: *awslogs
+