├── .env ├── .gitignore ├── LICENSE ├── README.md ├── advanced ├── docker-compose.cassandra.volumes.yml ├── docker-compose.confluent.yml ├── docker-compose.edqs.volumes.yml ├── docker-compose.edqs.yml ├── docker-compose.hybrid.yml ├── docker-compose.kafka.yml ├── docker-compose.postgres.volumes.yml ├── docker-compose.postgres.yml ├── docker-compose.prometheus-grafana.yml ├── docker-compose.valkey-cluster.volumes.yml ├── docker-compose.valkey-cluster.yml ├── docker-compose.valkey-sentinel.volumes.yml ├── docker-compose.valkey-sentinel.yml ├── docker-compose.valkey.volumes.yml ├── docker-compose.valkey.yml ├── docker-compose.volumes.yml ├── docker-compose.yml ├── haproxy │ └── config │ │ └── haproxy.cfg └── monitoring │ ├── grafana │ ├── config.monitoring │ └── provisioning │ │ ├── dashboards │ │ ├── attributes_cache.json │ │ ├── core_and_js_metrics.json │ │ ├── dashboard.yml │ │ ├── db_metrics.json │ │ ├── edqs.json │ │ ├── hybrid_db_metrics.json │ │ ├── rule_engine_metrics.json │ │ ├── single_service_metrics.json │ │ └── transport_metrics.json │ │ └── datasources │ │ └── datasource.yml │ └── prometheus │ └── prometheus.yml ├── basic ├── docker-compose.confluent.yml ├── docker-compose.hybrid.yml ├── docker-compose.kafka.yml ├── docker-compose.postgres.yml ├── docker-compose.prometheus-grafana.yml ├── docker-compose.valkey-cluster.yml ├── docker-compose.valkey-sentinel.yml ├── docker-compose.valkey.yml ├── docker-compose.yml ├── haproxy │ └── config │ │ └── haproxy.cfg └── monitoring │ ├── grafana │ ├── config.monitoring │ └── provisioning │ │ ├── dashboards │ │ ├── attributes_cache.json │ │ ├── core_js_tbel_metrics.json │ │ ├── dashboard.yml │ │ ├── db_metrics.json │ │ ├── hybrid_db_metrics.json │ │ ├── rule_engine_metrics.json │ │ ├── single_service_metrics.json │ │ └── transport_metrics.json │ │ └── datasources │ │ └── datasource.yml │ └── prometheus │ └── prometheus.yml ├── cache-valkey-cluster.env ├── cache-valkey-sentinel.env ├── cache-valkey.env ├── compose-utils.sh ├── docker-check-log-folders.sh ├── docker-create-log-folders.sh ├── docker-install-tb.sh ├── docker-remove-services.sh ├── docker-start-services.sh ├── docker-stop-services.sh ├── docker-update-service.sh ├── docker-upgrade-tb.sh ├── kafka.env ├── monolith ├── docker-compose.confluent.yml ├── docker-compose.hybrid.yml ├── docker-compose.kafka.yml ├── docker-compose.postgres.yml ├── docker-compose.prometheus-grafana.yml ├── docker-compose.valkey-cluster.yml ├── docker-compose.valkey-sentinel.yml ├── docker-compose.valkey.yml ├── docker-compose.yml ├── haproxy │ └── config │ │ └── haproxy.cfg └── monitoring │ ├── grafana │ ├── config.monitoring │ └── provisioning │ │ ├── dashboards │ │ ├── attributes_cache.json │ │ ├── core_and_js_metrics.json │ │ ├── dashboard.yml │ │ ├── db_metrics.json │ │ ├── hybrid_db_metrics.json │ │ ├── rule_engine_metrics.json │ │ ├── single_service_metrics.json │ │ └── transport_metrics.json │ │ └── datasources │ │ └── datasource.yml │ └── prometheus │ └── prometheus.yml ├── queue-confluent.env ├── queue-kafka.env ├── tb-coap-transport.env ├── tb-core-edqs.env ├── tb-edqs.env ├── tb-edqs └── conf │ ├── logback.xml │ └── tb-edqs.conf ├── tb-http-transport.env ├── tb-integration-executor.env ├── tb-integration-executor └── conf │ ├── logback.xml │ └── tb-integration-executor.conf ├── tb-js-executor.env ├── tb-lwm2m-transport.env ├── tb-mqtt-transport.env ├── tb-node.env ├── tb-node.hybrid.env ├── tb-node.postgres.env ├── tb-node └── conf │ ├── logback.xml │ ├── recaptcha.properties │ └── thingsboard.conf ├── tb-rule-engine-edqs.env ├── tb-snmp-transport.env ├── tb-transports ├── coap │ └── conf │ │ ├── logback.xml │ │ └── tb-coap-transport.conf ├── http │ └── conf │ │ ├── logback.xml │ │ └── tb-http-transport.conf ├── lwm2m │ └── conf │ │ ├── logback.xml │ │ └── tb-lwm2m-transport.conf ├── mqtt │ └── conf │ │ ├── logback.xml │ │ └── tb-mqtt-transport.conf └── snmp │ └── conf │ ├── logback.xml │ └── tb-snmp-transport.conf ├── tb-vc-executor.env ├── tb-vc-executor └── conf │ ├── logback.xml │ └── tb-vc-executor.conf ├── tb-web-report.env └── tb-web-ui.env /.env: -------------------------------------------------------------------------------- 1 | # advanced, basic, monolith 2 | TB_SETUP=basic 3 | 4 | # kafka, confluent 5 | TB_QUEUE_TYPE=kafka 6 | 7 | # valkey or valkey-cluster or valkey-sentinel 8 | CACHE=valkey 9 | 10 | DOCKER_REPO=thingsboard 11 | 12 | JS_EXECUTOR_DOCKER_NAME=tb-pe-js-executor 13 | TB_NODE_DOCKER_NAME=tb-pe-node 14 | WEB_UI_DOCKER_NAME=tb-pe-web-ui 15 | MQTT_TRANSPORT_DOCKER_NAME=tb-pe-mqtt-transport 16 | HTTP_TRANSPORT_DOCKER_NAME=tb-pe-http-transport 17 | COAP_TRANSPORT_DOCKER_NAME=tb-pe-coap-transport 18 | LWM2M_TRANSPORT_DOCKER_NAME=tb-pe-lwm2m-transport 19 | SNMP_TRANSPORT_DOCKER_NAME=tb-pe-snmp-transport 20 | TB_VC_EXECUTOR_DOCKER_NAME=tb-pe-vc-executor 21 | WEB_REPORT_DOCKER_NAME=tb-pe-web-report 22 | TB_INTEGRATION_EXECUTOR_DOCKER_NAME=tb-pe-integration-executor 23 | EDQS_DOCKER_NAME=tb-pe-edqs 24 | EDQS_ENABLED=false 25 | 26 | TB_VERSION=4.0.1PE 27 | 28 | # Database used by ThingsBoard, can be either postgres (PostgreSQL) or hybrid (PostgreSQL for entities database and Cassandra for timeseries database). 29 | # According to the database type corresponding docker service will be deployed (see docker-compose.postgres.yml, docker-compose.hybrid.yml for details). 30 | 31 | DATABASE=postgres 32 | 33 | LOAD_BALANCER_NAME=haproxy-certbot 34 | 35 | # If enabled Prometheus and Grafana containers are deployed along with other containers 36 | MONITORING_ENABLED=true 37 | 38 | # Limit memory usage for each Java application 39 | # JAVA_OPTS=-Xmx2048M -Xms2048M -Xss384k -XX:+AlwaysPreTouch 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | advanced/haproxy/certs.d/** 2 | advanced/haproxy/letsencrypt/** 3 | tb-node/log/** 4 | tb-node/data/** 5 | tb-node/db/** 6 | tb-node/postgres/** 7 | tb-node/cassandra/** 8 | tb-node/valkey-cluster-data-0/** 9 | tb-node/valkey-cluster-data-1/** 10 | tb-node/valkey-cluster-data-2/** 11 | tb-node/valkey-cluster-data-3/** 12 | tb-node/valkey-cluster-data-4/** 13 | tb-node/valkey-cluster-data-5/** 14 | tb-node/valkey-sentinel-data-primary/** 15 | tb-node/valkey-sentinel-data-replica/** 16 | tb-node/valkey-sentinel-data-sentinel/** 17 | tb-node/valkey-data/** 18 | tb-transports/*/log 19 | tb-integration-executor/log/ 20 | tb-vc-executor/log/ 21 | !.env 22 | */.idea/** 23 | .idea/** 24 | .idea 25 | *.iml 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker configuration for ThingsBoard Microservices 2 | 3 | This folder containing scripts and Docker Compose configurations to run ThingsBoard in Microservices mode. 4 | 5 | See official [documentation page](https://thingsboard.io/docs/user-guide/install/pe/cluster/docker-compose-setup/) for more details. 6 | 7 | -------------------------------------------------------------------------------- /advanced/docker-compose.cassandra.volumes.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | cassandra: 36 | volumes: 37 | - cassandra-volume:/var/lib/cassandra 38 | 39 | volumes: 40 | cassandra-volume: 41 | external: 42 | name: ${CASSANDRA_DATA_VOLUME} 43 | -------------------------------------------------------------------------------- /advanced/docker-compose.confluent.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | tb-js-executor: 36 | env_file: 37 | - ../queue-confluent.env 38 | tb-core1: 39 | env_file: 40 | - ../queue-confluent.env 41 | tb-core2: 42 | env_file: 43 | - ../queue-confluent.env 44 | tb-rule-engine1: 45 | env_file: 46 | - ../queue-confluent.env 47 | tb-rule-engine2: 48 | env_file: 49 | - ../queue-confluent.env 50 | tb-mqtt-transport1: 51 | env_file: 52 | - ../queue-confluent.env 53 | tb-mqtt-transport2: 54 | env_file: 55 | - ../queue-confluent.env 56 | tb-http-transport1: 57 | env_file: 58 | - ../queue-confluent.env 59 | tb-http-transport2: 60 | env_file: 61 | - ../queue-confluent.env 62 | tb-coap-transport: 63 | env_file: 64 | - ../queue-confluent.env 65 | tb-lwm2m-transport: 66 | env_file: 67 | - ../queue-confluent.env 68 | tb-snmp-transport: 69 | env_file: 70 | - ../queue-confluent.env 71 | tb-vc-executor1: 72 | env_file: 73 | - ../queue-confluent.env 74 | tb-vc-executor2: 75 | env_file: 76 | - ../queue-confluent.env 77 | tb-integration-executor1: 78 | env_file: 79 | - ../queue-confluent.env 80 | tb-integration-executor2: 81 | env_file: 82 | - ../queue-confluent.env 83 | -------------------------------------------------------------------------------- /advanced/docker-compose.edqs.volumes.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2025 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | tb-edqs1: 36 | volumes: 37 | - tb-edqs-log-volume:/var/log/tb-edqs 38 | tb-edqs2: 39 | volumes: 40 | - tb-edqs-log-volume:/var/log/tb-edqs 41 | 42 | volumes: 43 | tb-edqs-log-volume: 44 | external: 45 | name: ${TB_EDQS_LOG_VOLUME} 46 | -------------------------------------------------------------------------------- /advanced/docker-compose.edqs.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2025 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | tb-core1: 36 | env_file: 37 | - ../tb-core-edqs.env 38 | tb-core2: 39 | env_file: 40 | - ../tb-core-edqs.env 41 | tb-rule-engine1: 42 | env_file: 43 | - ../tb-rule-engine-edqs.env 44 | tb-rule-engine2: 45 | env_file: 46 | - ../tb-rule-engine-edqs.env 47 | tb-edqs1: 48 | restart: always 49 | image: "${DOCKER_REPO}/${EDQS_DOCKER_NAME}:${TB_VERSION}" 50 | environment: 51 | TB_SERVICE_ID: tb-edqs1 52 | JAVA_OPTS: "${JAVA_OPTS}" 53 | env_file: 54 | - ../tb-edqs.env 55 | volumes: 56 | - ../tb-edqs/conf:/usr/share/tb-edqs/conf 57 | - ../tb-edqs/log:/var/log/tb-edqs 58 | ports: 59 | - "8080" 60 | depends_on: 61 | - zookeeper 62 | - kafka 63 | tb-edqs2: 64 | restart: always 65 | image: "${DOCKER_REPO}/${EDQS_DOCKER_NAME}:${TB_VERSION}" 66 | environment: 67 | TB_SERVICE_ID: tb-edqs2 68 | JAVA_OPTS: "${JAVA_OPTS}" 69 | env_file: 70 | - ../tb-edqs.env 71 | volumes: 72 | - ../tb-edqs/conf:/usr/share/tb-edqs/conf 73 | - ../tb-edqs/log:/var/log/tb-edqs 74 | ports: 75 | - "8080" 76 | depends_on: 77 | - zookeeper 78 | - kafka 79 | -------------------------------------------------------------------------------- /advanced/docker-compose.hybrid.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | postgres: 36 | restart: always 37 | image: "postgres:16" 38 | ports: 39 | - "5432" 40 | environment: 41 | POSTGRES_DB: thingsboard 42 | POSTGRES_PASSWORD: postgres 43 | volumes: 44 | - ../tb-node/postgres:/var/lib/postgresql/data 45 | cassandra: 46 | restart: always 47 | image: "cassandra:5.0" 48 | ports: 49 | - "9042" 50 | volumes: 51 | - ../tb-node/cassandra:/var/lib/cassandra 52 | tb-core1: 53 | env_file: 54 | - ../tb-node.hybrid.env 55 | depends_on: 56 | - postgres 57 | - cassandra 58 | tb-core2: 59 | env_file: 60 | - ../tb-node.hybrid.env 61 | depends_on: 62 | - postgres 63 | - cassandra 64 | tb-rule-engine1: 65 | env_file: 66 | - ../tb-node.hybrid.env 67 | depends_on: 68 | - postgres 69 | - cassandra 70 | tb-rule-engine2: 71 | env_file: 72 | - ../tb-node.hybrid.env 73 | depends_on: 74 | - postgres 75 | - cassandra 76 | -------------------------------------------------------------------------------- /advanced/docker-compose.kafka.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | kafka: 36 | restart: always 37 | image: "bitnami/kafka:4.0" 38 | ports: 39 | - "9092:9092" 40 | env_file: 41 | - ../kafka.env 42 | tb-js-executor: 43 | env_file: 44 | - ../queue-kafka.env 45 | depends_on: 46 | - kafka 47 | tb-core1: 48 | env_file: 49 | - ../queue-kafka.env 50 | depends_on: 51 | - kafka 52 | tb-core2: 53 | env_file: 54 | - ../queue-kafka.env 55 | depends_on: 56 | - kafka 57 | tb-rule-engine1: 58 | env_file: 59 | - ../queue-kafka.env 60 | depends_on: 61 | - kafka 62 | tb-rule-engine2: 63 | env_file: 64 | - ../queue-kafka.env 65 | depends_on: 66 | - kafka 67 | tb-mqtt-transport1: 68 | env_file: 69 | - ../queue-kafka.env 70 | depends_on: 71 | - kafka 72 | tb-mqtt-transport2: 73 | env_file: 74 | - ../queue-kafka.env 75 | depends_on: 76 | - kafka 77 | tb-http-transport1: 78 | env_file: 79 | - ../queue-kafka.env 80 | depends_on: 81 | - kafka 82 | tb-http-transport2: 83 | env_file: 84 | - ../queue-kafka.env 85 | depends_on: 86 | - kafka 87 | tb-coap-transport: 88 | env_file: 89 | - ../queue-kafka.env 90 | depends_on: 91 | - kafka 92 | tb-lwm2m-transport: 93 | env_file: 94 | - ../queue-kafka.env 95 | depends_on: 96 | - kafka 97 | tb-snmp-transport: 98 | env_file: 99 | - ../queue-kafka.env 100 | depends_on: 101 | - kafka 102 | tb-vc-executor1: 103 | env_file: 104 | - ../queue-kafka.env 105 | depends_on: 106 | - kafka 107 | tb-vc-executor2: 108 | env_file: 109 | - ../queue-kafka.env 110 | depends_on: 111 | - kafka 112 | tb-integration-executor1: 113 | env_file: 114 | - ../queue-kafka.env 115 | depends_on: 116 | - kafka 117 | tb-integration-executor2: 118 | env_file: 119 | - ../queue-kafka.env 120 | depends_on: 121 | - kafka 122 | -------------------------------------------------------------------------------- /advanced/docker-compose.postgres.volumes.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | postgres: 36 | volumes: 37 | - postgres-db-volume:/var/lib/postgresql/data 38 | 39 | volumes: 40 | postgres-db-volume: 41 | external: 42 | name: ${POSTGRES_DATA_VOLUME} 43 | -------------------------------------------------------------------------------- /advanced/docker-compose.postgres.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | postgres: 36 | restart: always 37 | image: "postgres:16" 38 | ports: 39 | - "5432" 40 | environment: 41 | POSTGRES_DB: thingsboard 42 | POSTGRES_PASSWORD: postgres 43 | volumes: 44 | - ../tb-node/postgres:/var/lib/postgresql/data 45 | tb-core1: 46 | env_file: 47 | - ../tb-node.postgres.env 48 | depends_on: 49 | - postgres 50 | tb-core2: 51 | env_file: 52 | - ../tb-node.postgres.env 53 | depends_on: 54 | - postgres 55 | tb-rule-engine1: 56 | env_file: 57 | - ../tb-node.postgres.env 58 | depends_on: 59 | - postgres 60 | tb-rule-engine2: 61 | env_file: 62 | - ../tb-node.postgres.env 63 | depends_on: 64 | - postgres 65 | -------------------------------------------------------------------------------- /advanced/docker-compose.prometheus-grafana.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | volumes: 35 | prometheus_data: {} 36 | grafana_data: {} 37 | 38 | services: 39 | 40 | prometheus: 41 | image: prom/prometheus:v3.1.0 42 | volumes: 43 | - ./monitoring/prometheus/:/etc/prometheus/ 44 | - prometheus_data:/prometheus 45 | command: 46 | - '--config.file=/etc/prometheus/prometheus.yml' 47 | ports: 48 | - 9090 # PE does not expose this port to avoid port binding conflict with load balancer exposed port 49 | restart: always 50 | grafana: 51 | image: grafana/grafana 52 | user: "472" 53 | depends_on: 54 | - prometheus 55 | ports: 56 | - 3000:3000 57 | volumes: 58 | - grafana_data:/var/lib/grafana 59 | - ./monitoring/grafana/provisioning/:/etc/grafana/provisioning/ 60 | env_file: 61 | - monitoring/grafana/config.monitoring 62 | restart: always -------------------------------------------------------------------------------- /advanced/docker-compose.valkey-cluster.volumes.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | # Valkey cluster 36 | valkey-node-0: 37 | volumes: 38 | - valkey-cluster-data-0:/bitnami/valkey/data 39 | valkey-node-1: 40 | volumes: 41 | - valkey-cluster-data-1:/bitnami/valkey/data 42 | valkey-node-2: 43 | volumes: 44 | - valkey-cluster-data-2:/bitnami/valkey/data 45 | valkey-node-3: 46 | volumes: 47 | - valkey-cluster-data-3:/bitnami/valkey/data 48 | valkey-node-4: 49 | volumes: 50 | - valkey-cluster-data-4:/bitnami/valkey/data 51 | valkey-node-5: 52 | volumes: 53 | - valkey-cluster-data-5:/bitnami/valkey/data 54 | 55 | volumes: 56 | valkey-cluster-data-0: 57 | external: 58 | name: ${VALKEY_CLUSTER_DATA_VOLUME_0} 59 | valkey-cluster-data-1: 60 | external: 61 | name: ${VALKEY_CLUSTER_DATA_VOLUME_1} 62 | valkey-cluster-data-2: 63 | external: 64 | name: ${VALKEY_CLUSTER_DATA_VOLUME_2} 65 | valkey-cluster-data-3: 66 | external: 67 | name: ${VALKEY_CLUSTER_DATA_VOLUME_3} 68 | valkey-cluster-data-4: 69 | external: 70 | name: ${VALKEY_CLUSTER_DATA_VOLUME_4} 71 | valkey-cluster-data-5: 72 | external: 73 | name: ${VALKEY_CLUSTER_DATA_VOLUME_5} 74 | -------------------------------------------------------------------------------- /advanced/docker-compose.valkey-sentinel.volumes.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | # Valkey sentinel 36 | valkey-primary: 37 | volumes: 38 | - valkey-sentinel-data-primary:/bitnami/valkey/data 39 | valkey-replica: 40 | volumes: 41 | - valkey-sentinel-data-replica:/bitnami/valkey/data 42 | valkey-sentinel: 43 | volumes: 44 | - valkey-sentinel-data-sentinel:/bitnami/valkey/data 45 | 46 | volumes: 47 | valkey-sentinel-data-primary: 48 | external: 49 | name: ${VALKEY_SENTINEL_DATA_VOLUME_PRIMARY} 50 | valkey-sentinel-data-replica: 51 | external: 52 | name: ${VALKEY_SENTINEL_DATA_VOLUME_REPLICA} 53 | valkey-sentinel-data-sentinel: 54 | external: 55 | name: ${VALKEY_SENTINEL_DATA_VOLUME_SENTINEL} 56 | -------------------------------------------------------------------------------- /advanced/docker-compose.valkey-sentinel.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | # Valkey sentinel 36 | # The latest version of Valkey compatible with ThingsBoard is 8.0 37 | valkey-primary: 38 | image: 'bitnami/valkey:8.0' 39 | volumes: 40 | - ../tb-node/valkey-sentinel-data-primary:/bitnami/valkey/data 41 | environment: 42 | - 'VALKEY_REPLICATION_MODE=primary' 43 | - 'VALKEY_PASSWORD=thingsboard' 44 | 45 | valkey-replica: 46 | image: 'bitnami/valkey:8.0' 47 | volumes: 48 | - ../tb-node/valkey-sentinel-data-perlica:/bitnami/valkey/data 49 | environment: 50 | - 'VALKEY_REPLICATION_MODE=replica' 51 | - 'VALKEY_PRIMARY_HOST=valkey-primary' 52 | - 'VALKEY_PRIMARY_PASSWORD=thingsboard' 53 | - 'VALKEY_PASSWORD=thingsboard' 54 | depends_on: 55 | - valkey-primary 56 | 57 | valkey-sentinel: 58 | image: 'bitnami/valkey-sentinel:8.0' 59 | volumes: 60 | - ../tb-node/valkey-sentinel-data-sentinel:/bitnami/valkey/data 61 | environment: 62 | - 'VALKEY_PRIMARY_HOST=valkey-primary' 63 | - 'VALKEY_PRIMARY_SET=myprimary' 64 | - 'VALKEY_SENTINEL_PASSWORD=sentinel' 65 | - 'VALKEY_PRIMARY_PASSWORD=thingsboard' 66 | depends_on: 67 | - valkey-primary 68 | - valkey-replica 69 | 70 | # ThingsBoard setup to use valkey-sentinel 71 | tb-core1: 72 | env_file: 73 | - ../cache-valkey-sentinel.env 74 | depends_on: 75 | - valkey-sentinel 76 | tb-core2: 77 | env_file: 78 | - ../cache-valkey-sentinel.env 79 | depends_on: 80 | - valkey-sentinel 81 | tb-rule-engine1: 82 | env_file: 83 | - ../cache-valkey-sentinel.env 84 | depends_on: 85 | - valkey-sentinel 86 | tb-rule-engine2: 87 | env_file: 88 | - ../cache-valkey-sentinel.env 89 | depends_on: 90 | - valkey-sentinel 91 | tb-mqtt-transport1: 92 | env_file: 93 | - ../cache-valkey-sentinel.env 94 | depends_on: 95 | - valkey-sentinel 96 | tb-mqtt-transport2: 97 | env_file: 98 | - ../cache-valkey-sentinel.env 99 | depends_on: 100 | - valkey-sentinel 101 | tb-http-transport1: 102 | env_file: 103 | - ../cache-valkey-sentinel.env 104 | depends_on: 105 | - valkey-sentinel 106 | tb-http-transport2: 107 | env_file: 108 | - ../cache-valkey-sentinel.env 109 | depends_on: 110 | - valkey-sentinel 111 | tb-coap-transport: 112 | env_file: 113 | - ../cache-valkey-sentinel.env 114 | depends_on: 115 | - valkey-sentinel 116 | tb-lwm2m-transport: 117 | env_file: 118 | - ../cache-valkey-sentinel.env 119 | depends_on: 120 | - valkey-sentinel 121 | tb-snmp-transport: 122 | env_file: 123 | - ../cache-valkey-sentinel.env 124 | depends_on: 125 | - valkey-sentinel 126 | tb-vc-executor1: 127 | env_file: 128 | - ../cache-valkey-sentinel.env 129 | depends_on: 130 | - valkey-sentinel 131 | tb-vc-executor2: 132 | env_file: 133 | - ../cache-valkey-sentinel.env 134 | depends_on: 135 | - valkey-sentinel 136 | -------------------------------------------------------------------------------- /advanced/docker-compose.valkey.volumes.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | valkey: 36 | volumes: 37 | - valkey-data:/bitnami/valkey/data 38 | 39 | volumes: 40 | valkey-data: 41 | external: 42 | name: ${VALKEY_DATA_VOLUME} 43 | -------------------------------------------------------------------------------- /advanced/docker-compose.valkey.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | # Valkey standalone 36 | # The latest version of Valkey compatible with ThingsBoard is 8.0 37 | valkey: 38 | restart: always 39 | image: bitnami/valkey:8.0 40 | environment: 41 | # ALLOW_EMPTY_PASSWORD is recommended only for development. 42 | ALLOW_EMPTY_PASSWORD: "yes" 43 | ports: 44 | - '6379:6379' 45 | volumes: 46 | - ../tb-node/valkey-data:/bitnami/valkey/data 47 | 48 | # ThingsBoard setup to use valkey-standalone 49 | tb-core1: 50 | env_file: 51 | - ../cache-valkey.env 52 | depends_on: 53 | - valkey 54 | tb-core2: 55 | env_file: 56 | - ../cache-valkey.env 57 | depends_on: 58 | - valkey 59 | tb-rule-engine1: 60 | env_file: 61 | - ../cache-valkey.env 62 | depends_on: 63 | - valkey 64 | tb-rule-engine2: 65 | env_file: 66 | - ../cache-valkey.env 67 | depends_on: 68 | - valkey 69 | tb-mqtt-transport1: 70 | env_file: 71 | - ../cache-valkey.env 72 | depends_on: 73 | - valkey 74 | tb-mqtt-transport2: 75 | env_file: 76 | - ../cache-valkey.env 77 | depends_on: 78 | - valkey 79 | tb-http-transport1: 80 | env_file: 81 | - ../cache-valkey.env 82 | depends_on: 83 | - valkey 84 | tb-http-transport2: 85 | env_file: 86 | - ../cache-valkey.env 87 | depends_on: 88 | - valkey 89 | tb-coap-transport: 90 | env_file: 91 | - ../cache-valkey.env 92 | depends_on: 93 | - valkey 94 | tb-lwm2m-transport: 95 | env_file: 96 | - ../cache-valkey.env 97 | depends_on: 98 | - valkey 99 | tb-snmp-transport: 100 | env_file: 101 | - ../cache-valkey.env 102 | depends_on: 103 | - valkey 104 | tb-vc-executor1: 105 | env_file: 106 | - ../cache-valkey.env 107 | depends_on: 108 | - valkey 109 | tb-vc-executor2: 110 | env_file: 111 | - ../cache-valkey.env 112 | depends_on: 113 | - valkey 114 | tb-integration-executor1: 115 | env_file: 116 | - ../cache-valkey.env 117 | depends_on: 118 | - valkey 119 | tb-integration-executor2: 120 | env_file: 121 | - ../cache-valkey.env 122 | depends_on: 123 | - valkey 124 | -------------------------------------------------------------------------------- /advanced/docker-compose.volumes.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | tb-core1: 36 | volumes: 37 | - tb-log-volume:/var/log/thingsboard 38 | tb-core2: 39 | volumes: 40 | - tb-log-volume:/var/log/thingsboard 41 | tb-rule-engine1: 42 | volumes: 43 | - tb-log-volume:/var/log/thingsboard 44 | tb-rule-engine2: 45 | volumes: 46 | - tb-log-volume:/var/log/thingsboard 47 | tb-coap-transport: 48 | volumes: 49 | - tb-coap-transport-log-volume:/var/log/tb-coap-transport 50 | tb-lwm2m-transport: 51 | volumes: 52 | - tb-lwm2m-transport-log-volume:/var/log/tb-lwm2m-transport 53 | tb-http-transport1: 54 | volumes: 55 | - tb-http-transport-log-volume:/var/log/tb-http-transport 56 | tb-http-transport2: 57 | volumes: 58 | - tb-http-transport-log-volume:/var/log/tb-http-transport 59 | tb-mqtt-transport1: 60 | volumes: 61 | - tb-mqtt-transport-log-volume:/var/log/tb-mqtt-transport 62 | tb-mqtt-transport2: 63 | volumes: 64 | - tb-mqtt-transport-log-volume:/var/log/tb-mqtt-transport 65 | tb-snmp-transport: 66 | volumes: 67 | - tb-snmp-transport-log-volume:/var/log/tb-snmp-transport 68 | tb-vc-executor1: 69 | volumes: 70 | - tb-vc-executor-log-volume:/var/log/tb-vc-executor 71 | tb-vc-executor2: 72 | volumes: 73 | - tb-vc-executor-log-volume:/var/log/tb-vc-executor 74 | tb-integration-executor1: 75 | volumes: 76 | - tb-ie-log-volume:/var/log/tb-integration-executor 77 | tb-integration-executor2: 78 | volumes: 79 | - tb-ie-log-volume:/var/log/tb-integration-executor 80 | 81 | volumes: 82 | tb-log-volume: 83 | external: 84 | name: ${TB_LOG_VOLUME} 85 | tb-coap-transport-log-volume: 86 | external: 87 | name: ${TB_COAP_TRANSPORT_LOG_VOLUME} 88 | tb-lwm2m-transport-log-volume: 89 | external: 90 | name: ${TB_LWM2M_TRANSPORT_LOG_VOLUME} 91 | tb-http-transport-log-volume: 92 | external: 93 | name: ${TB_HTTP_TRANSPORT_LOG_VOLUME} 94 | tb-mqtt-transport-log-volume: 95 | external: 96 | name: ${TB_MQTT_TRANSPORT_LOG_VOLUME} 97 | tb-snmp-transport-log-volume: 98 | external: 99 | name: ${TB_SNMP_TRANSPORT_LOG_VOLUME} 100 | tb-vc-executor-log-volume: 101 | external: 102 | name: ${TB_VC_EXECUTOR_LOG_VOLUME} 103 | tb-ie-log-volume: 104 | external: 105 | name: ${TB_INTEGRATION_EXECUTOR_LOG_VOLUME} 106 | -------------------------------------------------------------------------------- /advanced/haproxy/config/haproxy.cfg: -------------------------------------------------------------------------------- 1 | #HA Proxy Config 2 | global 3 | ulimit-n 500000 4 | maxconn 99999 5 | maxpipes 99999 6 | tune.maxaccept 500 7 | 8 | log 127.0.0.1 local0 9 | log 127.0.0.1 local1 notice 10 | 11 | ca-base /etc/ssl/certs 12 | crt-base /etc/ssl/private 13 | 14 | ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS 15 | ssl-default-bind-options no-sslv3 16 | 17 | defaults 18 | 19 | log global 20 | 21 | mode http 22 | 23 | timeout connect 5000ms 24 | timeout client 50000ms 25 | timeout server 50000ms 26 | timeout tunnel 1h # timeout to use with WebSocket and CONNECT 27 | 28 | default-server init-addr none 29 | 30 | #enable resolving throught docker dns and avoid crashing if service is down while proxy is starting 31 | resolvers docker_resolver 32 | nameserver dns 127.0.0.11:53 33 | 34 | listen stats 35 | bind *:9999 36 | stats enable 37 | stats hide-version 38 | stats uri /stats 39 | stats auth admin:admin@123 40 | 41 | listen mqtt-in 42 | bind *:${MQTT_PORT} 43 | mode tcp 44 | option clitcpka # For TCP keep-alive 45 | timeout client 3h 46 | timeout server 3h 47 | option tcplog 48 | balance source 49 | server tbMqtt1 tb-mqtt-transport1:1883 check inter 5s resolvers docker_resolver resolve-prefer ipv4 50 | server tbMqtt2 tb-mqtt-transport2:1883 check inter 5s resolvers docker_resolver resolve-prefer ipv4 51 | 52 | listen edges-rpc-in 53 | bind *:${EDGES_RPC_PORT} 54 | mode tcp 55 | option clitcpka # For TCP keep-alive 56 | timeout client 3h 57 | timeout server 3h 58 | option tcplog 59 | balance leastconn 60 | server tbEdgesRpc1 tb-core1:7070 check inter 5s resolvers docker_resolver resolve-prefer ipv4 61 | server tbEdgesRpc2 tb-core2:7070 check inter 5s resolvers docker_resolver resolve-prefer ipv4 62 | 63 | listen integrations-rpc-in 64 | bind *:${INTEGRATIONS_RPC_PORT} 65 | mode tcp 66 | option clitcpka # For TCP keep-alive 67 | timeout client 3h 68 | timeout server 3h 69 | option tcplog 70 | balance leastconn 71 | server tbIntegrationsRpc1 tb-core1:9090 check inter 5s resolvers docker_resolver resolve-prefer ipv4 72 | server tbIntegrationsRpc2 tb-core2:9090 check inter 5s resolvers docker_resolver resolve-prefer ipv4 73 | 74 | frontend http-in 75 | bind *:${HTTP_PORT} alpn h2,http/1.1 76 | 77 | option forwardfor 78 | 79 | http-request add-header "X-Forwarded-Proto" "http" 80 | 81 | acl transport_http_acl path_beg /api/v1/ 82 | acl integrations_http_acl path_beg /api/v1/integrations/ 83 | acl letsencrypt_http_acl path_beg /.well-known/acme-challenge/ 84 | acl tb_api_acl path_beg /api/ /swagger /webjars /v2/ /v3/ /static/rulenode/ /oauth2/ /login/oauth2/ /.well-known/assetlinks.json /.well-known/apple-app-site-association 85 | 86 | redirect scheme https if !letsencrypt_http_acl !transport_http_acl { env(FORCE_HTTPS_REDIRECT) -m str true } 87 | 88 | use_backend letsencrypt_http if letsencrypt_http_acl 89 | use_backend tb-http-backend if transport_http_acl !integrations_http_acl 90 | use_backend tb-integration-executor-backend if integrations_http_acl 91 | use_backend tb-api-backend if tb_api_acl 92 | 93 | default_backend tb-web-backend 94 | 95 | frontend https_in 96 | bind *:${HTTPS_PORT} ssl crt /usr/local/etc/haproxy/default.pem crt /usr/local/etc/haproxy/certs.d ciphers ECDHE-RSA-AES256-SHA:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM alpn h2,http/1.1 97 | 98 | option forwardfor 99 | 100 | http-request add-header "X-Forwarded-Proto" "https" 101 | 102 | acl transport_http_acl path_beg /api/v1/ 103 | acl integrations_http_acl path_beg /api/v1/integrations/ 104 | acl tb_api_acl path_beg /api/ /swagger /webjars /v2/ /v3/ /static/rulenode/ /oauth2/ /login/oauth2/ /.well-known/assetlinks.json /.well-known/apple-app-site-association 105 | 106 | use_backend tb-http-backend if transport_http_acl !integrations_http_acl 107 | use_backend tb-integration-executor-backend if integrations_http_acl 108 | use_backend tb-api-backend if tb_api_acl 109 | 110 | default_backend tb-web-backend 111 | 112 | frontend web-report-in 113 | bind *:${WEBREPORT_PORT} 114 | 115 | http-request add-header "X-Forwarded-Proto" "http" 116 | 117 | default_backend tb-web-report-backend 118 | 119 | backend letsencrypt_http 120 | server letsencrypt_http_srv 127.0.0.1:8080 121 | 122 | backend tb-web-backend 123 | balance leastconn 124 | option tcp-check 125 | option log-health-checks 126 | server tbWeb1 tb-web-ui1:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4 127 | server tbWeb2 tb-web-ui2:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4 128 | http-request set-header X-Forwarded-Port %[dst_port] 129 | 130 | backend tb-web-report-backend 131 | balance leastconn 132 | option tcp-check 133 | option log-health-checks 134 | server tbWebReport1 tb-web-report1:8383 check inter 5s resolvers docker_resolver resolve-prefer ipv4 135 | server tbWebReport2 tb-web-report2:8383 check inter 5s resolvers docker_resolver resolve-prefer ipv4 136 | http-request set-header X-Forwarded-Port %[dst_port] 137 | 138 | backend tb-http-backend 139 | balance leastconn 140 | option tcp-check 141 | option log-health-checks 142 | server tbHttp1 tb-http-transport1:8081 check inter 5s resolvers docker_resolver resolve-prefer ipv4 143 | server tbHttp2 tb-http-transport2:8081 check inter 5s resolvers docker_resolver resolve-prefer ipv4 144 | 145 | backend tb-api-backend 146 | balance leastconn 147 | option tcp-check 148 | option log-health-checks 149 | server tbApi1 tb-core1:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4 150 | server tbApi2 tb-core2:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4 151 | http-request set-header X-Forwarded-Port %[dst_port] 152 | 153 | backend tb-integration-executor-backend 154 | balance leastconn 155 | option tcp-check 156 | option log-health-checks 157 | server tbIe1 tb-integration-executor1:8082 check inter 5s resolvers docker_resolver resolve-prefer ipv4 158 | server tbIe2 tb-integration-executor2:8082 check inter 5s resolvers docker_resolver resolve-prefer ipv4 159 | http-request set-header X-Forwarded-Port %[dst_port] 160 | 161 | -------------------------------------------------------------------------------- /advanced/monitoring/grafana/config.monitoring: -------------------------------------------------------------------------------- 1 | GF_SECURITY_ADMIN_PASSWORD=foobar 2 | GF_USERS_ALLOW_SIGN_UP=false 3 | -------------------------------------------------------------------------------- /advanced/monitoring/grafana/provisioning/dashboards/dashboard.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | apiVersion: 1 33 | 34 | providers: 35 | - name: 'Prometheus' 36 | orgId: 1 37 | folder: '' 38 | type: file 39 | disableDeletion: false 40 | editable: true 41 | options: 42 | path: /etc/grafana/provisioning/dashboards 43 | -------------------------------------------------------------------------------- /advanced/monitoring/grafana/provisioning/datasources/datasource.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | # config file version 33 | apiVersion: 1 34 | 35 | # list of datasources that should be deleted from the database 36 | deleteDatasources: 37 | - name: Prometheus 38 | orgId: 1 39 | 40 | # list of datasources to insert/update depending 41 | # whats available in the database 42 | datasources: 43 | # name of the datasource. Required 44 | - name: Prometheus 45 | # datasource type. Required 46 | type: prometheus 47 | # access mode. direct or proxy. Required 48 | access: proxy 49 | # org id. will default to orgId 1 if not specified 50 | orgId: 1 51 | # url 52 | url: http://prometheus:9090 53 | # database password, if used 54 | password: 55 | # database user, if used 56 | user: 57 | # database name, if used 58 | database: 59 | # enable/disable basic auth 60 | basicAuth: false 61 | # basic auth username, if used 62 | basicAuthUser: 63 | # basic auth password, if used 64 | basicAuthPassword: 65 | # enable/disable with credentials headers 66 | withCredentials: 67 | # mark as default datasource. Max one per org 68 | isDefault: true 69 | # fields that will be converted to json and stored in json_data 70 | jsonData: 71 | graphiteVersion: "1.1" 72 | tlsAuth: false 73 | tlsAuthWithCACert: false 74 | # json object of data that will be encrypted. 75 | secureJsonData: 76 | tlsCACert: "..." 77 | tlsClientCert: "..." 78 | tlsClientKey: "..." 79 | version: 1 80 | # allow users to edit datasources from the UI. 81 | editable: true 82 | -------------------------------------------------------------------------------- /advanced/monitoring/prometheus/prometheus.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | # my global config 33 | global: 34 | scrape_interval: 15s # By default, scrape targets every 15 seconds. 35 | evaluation_interval: 15s # By default, scrape targets every 15 seconds. 36 | # scrape_timeout is set to the global default (10s). 37 | 38 | # Attach these labels to any time series or alerts when communicating with 39 | # external systems (federation, remote storage, Alertmanager). 40 | external_labels: 41 | monitor: 'thingsboard' 42 | 43 | 44 | # A scrape configuration containing exactly one endpoint to scrape: 45 | # Here it's Prometheus itself. 46 | scrape_configs: 47 | # The job name is added as a label `job=` to any timeseries scraped from this config. 48 | 49 | - job_name: 'prometheus' 50 | scrape_interval: 5s 51 | static_configs: 52 | - targets: ['localhost:9090'] 53 | 54 | - job_name: 'tb-core1' 55 | metrics_path: /actuator/prometheus 56 | static_configs: 57 | - targets: [ 'tb-core1:8080' ] 58 | 59 | - job_name: 'tb-core2' 60 | metrics_path: /actuator/prometheus 61 | static_configs: 62 | - targets: [ 'tb-core2:8080' ] 63 | 64 | - job_name: 'tb-rule-engine1' 65 | metrics_path: /actuator/prometheus 66 | static_configs: 67 | - targets: [ 'tb-rule-engine1:8080' ] 68 | 69 | - job_name: 'tb-rule-engine2' 70 | metrics_path: /actuator/prometheus 71 | static_configs: 72 | - targets: [ 'tb-rule-engine2:8080' ] 73 | 74 | - job_name: 'tb-mqtt-transport1' 75 | metrics_path: /actuator/prometheus 76 | static_configs: 77 | - targets: [ 'tb-mqtt-transport1:8081' ] 78 | 79 | - job_name: 'tb-mqtt-transport2' 80 | metrics_path: /actuator/prometheus 81 | static_configs: 82 | - targets: [ 'tb-mqtt-transport2:8081' ] 83 | 84 | - job_name: 'tb-http-transport1' 85 | metrics_path: /actuator/prometheus 86 | static_configs: 87 | - targets: [ 'tb-http-transport1:8081' ] 88 | 89 | - job_name: 'tb-http-transport2' 90 | metrics_path: /actuator/prometheus 91 | static_configs: 92 | - targets: [ 'tb-http-transport2:8081' ] 93 | 94 | - job_name: 'tb-coap-transport' 95 | metrics_path: /actuator/prometheus 96 | static_configs: 97 | - targets: [ 'tb-coap-transport:8081' ] 98 | 99 | - job_name: 'tb-lwm2m-transport' 100 | metrics_path: /actuator/prometheus 101 | static_configs: 102 | - targets: [ 'tb-lwm2m-transport:8081' ] 103 | 104 | - job_name: 'tb-snmp-transport' 105 | metrics_path: /actuator/prometheus 106 | static_configs: 107 | - targets: [ 'tb-snmp-transport:8081' ] 108 | -------------------------------------------------------------------------------- /basic/docker-compose.confluent.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | tb-js-executor: 36 | env_file: 37 | - ../queue-confluent.env 38 | tb-monolith: 39 | env_file: 40 | - ../queue-confluent.env 41 | tb-mqtt-transport: 42 | env_file: 43 | - ../queue-confluent.env 44 | tb-http-transport: 45 | env_file: 46 | - ../queue-confluent.env 47 | tb-coap-transport: 48 | env_file: 49 | - ../queue-confluent.env 50 | tb-lwm2m-transport: 51 | env_file: 52 | - ../queue-confluent.env 53 | tb-snmp-transport: 54 | env_file: 55 | - ../queue-confluent.env 56 | tb-vc-executor: 57 | env_file: 58 | - ../queue-confluent.env 59 | -------------------------------------------------------------------------------- /basic/docker-compose.hybrid.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright © 2016-2020 The Thingsboard Authors 3 | # 4 | # NOTICE: All information contained herein is, and remains 5 | # the property of ThingsBoard, Inc. and its suppliers, 6 | # if any. The intellectual and technical concepts contained 7 | # herein are proprietary to ThingsBoard, Inc. 8 | # and its suppliers and may be covered by U.S. and Foreign Patents, 9 | # patents in process, and are protected by trade secret or copyright law. 10 | # 11 | # Dissemination of this information or reproduction of this material is strictly forbidden 12 | # unless prior written permission is obtained from COMPANY. 13 | # 14 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 15 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 16 | # explicitly covering such access. 17 | # 18 | # The copyright notice above does not evidence any actual or intended publication 19 | # or disclosure of this source code, which includes 20 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 21 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 22 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 23 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 24 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 25 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 26 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 27 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 28 | # 29 | 30 | version: '3.0' 31 | 32 | services: 33 | postgres: 34 | restart: always 35 | image: "postgres:16" 36 | ports: 37 | - "5432" 38 | environment: 39 | POSTGRES_DB: thingsboard 40 | POSTGRES_PASSWORD: postgres 41 | volumes: 42 | - ../tb-node/postgres:/var/lib/postgresql/data 43 | cassandra: 44 | restart: always 45 | image: "cassandra:5.0" 46 | ports: 47 | - "9042" 48 | volumes: 49 | - ../tb-node/cassandra:/var/lib/cassandra 50 | tb-monolith: 51 | env_file: 52 | - ../tb-node.hybrid.env 53 | depends_on: 54 | - postgres 55 | - cassandra 56 | -------------------------------------------------------------------------------- /basic/docker-compose.kafka.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | kafka: 36 | restart: always 37 | image: "bitnami/kafka:4.0" 38 | ports: 39 | - "9092:9092" 40 | env_file: 41 | - ../kafka.env 42 | tb-js-executor: 43 | env_file: 44 | - ../queue-kafka.env 45 | depends_on: 46 | - kafka 47 | tb-monolith: 48 | env_file: 49 | - ../queue-kafka.env 50 | depends_on: 51 | - kafka 52 | tb-mqtt-transport: 53 | env_file: 54 | - ../queue-kafka.env 55 | depends_on: 56 | - kafka 57 | tb-http-transport: 58 | env_file: 59 | - ../queue-kafka.env 60 | depends_on: 61 | - kafka 62 | tb-coap-transport: 63 | env_file: 64 | - ../queue-kafka.env 65 | depends_on: 66 | - kafka 67 | tb-lwm2m-transport: 68 | env_file: 69 | - ../queue-kafka.env 70 | depends_on: 71 | - kafka 72 | tb-snmp-transport: 73 | env_file: 74 | - ../queue-kafka.env 75 | depends_on: 76 | - kafka 77 | tb-vc-executor: 78 | env_file: 79 | - ../queue-kafka.env 80 | depends_on: 81 | - kafka 82 | -------------------------------------------------------------------------------- /basic/docker-compose.postgres.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | postgres: 36 | restart: always 37 | image: "postgres:16" 38 | ports: 39 | - "5432" 40 | environment: 41 | POSTGRES_DB: thingsboard 42 | POSTGRES_PASSWORD: postgres 43 | volumes: 44 | - ../tb-node/postgres:/var/lib/postgresql/data 45 | tb-monolith: 46 | env_file: 47 | - ../tb-node.postgres.env 48 | depends_on: 49 | - postgres 50 | -------------------------------------------------------------------------------- /basic/docker-compose.prometheus-grafana.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | volumes: 35 | prometheus_data: {} 36 | grafana_data: {} 37 | 38 | services: 39 | 40 | prometheus: 41 | image: prom/prometheus:v3.1.0 42 | volumes: 43 | - ./monitoring/prometheus/:/etc/prometheus/ 44 | - prometheus_data:/prometheus 45 | command: 46 | - '--config.file=/etc/prometheus/prometheus.yml' 47 | ports: 48 | - 9090 # PE does not expose this port to avoid port binding conflict with load balancer exposed port 49 | restart: always 50 | grafana: 51 | image: grafana/grafana 52 | user: "472" 53 | depends_on: 54 | - prometheus 55 | ports: 56 | - 3000:3000 57 | volumes: 58 | - grafana_data:/var/lib/grafana 59 | - ./monitoring/grafana/provisioning/:/etc/grafana/provisioning/ 60 | env_file: 61 | - monitoring/grafana/config.monitoring 62 | restart: always -------------------------------------------------------------------------------- /basic/docker-compose.valkey-cluster.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | # Valkey cluster 36 | # The latest version of Valkey compatible with ThingsBoard is 8.0 37 | valkey-node-0: 38 | image: bitnami/valkey-cluster:8.0 39 | volumes: 40 | - ../tb-node/valkey-cluster-data-0:/bitnami/valkey/data 41 | environment: 42 | - 'VALKEY_PASSWORD=thingsboard' 43 | - 'VALKEY_NODES=valkey-node-0 valkey-node-1 valkey-node-2 valkey-node-3 valkey-node-4 valkey-node-5' 44 | 45 | valkey-node-1: 46 | image: bitnami/valkey-cluster:8.0 47 | volumes: 48 | - ../tb-node/valkey-cluster-data-1:/bitnami/valkey/data 49 | depends_on: 50 | - valkey-node-0 51 | environment: 52 | - 'VALKEY_PASSWORD=thingsboard' 53 | - 'VALKEY_NODES=valkey-node-0 valkey-node-1 valkey-node-2 valkey-node-3 valkey-node-4 valkey-node-5' 54 | 55 | valkey-node-2: 56 | image: bitnami/valkey-cluster:8.0 57 | volumes: 58 | - ../tb-node/valkey-cluster-data-2:/bitnami/valkey/data 59 | depends_on: 60 | - valkey-node-1 61 | environment: 62 | - 'VALKEY_PASSWORD=thingsboard' 63 | - 'VALKEY_NODES=valkey-node-0 valkey-node-1 valkey-node-2 valkey-node-3 valkey-node-4 valkey-node-5' 64 | 65 | valkey-node-3: 66 | image: bitnami/valkey-cluster:8.0 67 | volumes: 68 | - ../tb-node/valkey-cluster-data-3:/bitnami/valkey/data 69 | depends_on: 70 | - valkey-node-2 71 | environment: 72 | - 'VALKEY_PASSWORD=thingsboard' 73 | - 'VALKEY_NODES=valkey-node-0 valkey-node-1 valkey-node-2 valkey-node-3 valkey-node-4 valkey-node-5' 74 | 75 | valkey-node-4: 76 | image: bitnami/valkey-cluster:8.0 77 | volumes: 78 | - ../tb-node/valkey-cluster-data-4:/bitnami/valkey/data 79 | depends_on: 80 | - valkey-node-3 81 | environment: 82 | - 'VALKEY_PASSWORD=thingsboard' 83 | - 'VALKEY_NODES=valkey-node-0 valkey-node-1 valkey-node-2 valkey-node-3 valkey-node-4 valkey-node-5' 84 | 85 | valkey-node-5: 86 | image: bitnami/valkey-cluster:8.0 87 | volumes: 88 | - ../tb-node/valkey-cluster-data-5:/bitnami/valkey/data 89 | depends_on: 90 | - valkey-node-0 91 | - valkey-node-1 92 | - valkey-node-2 93 | - valkey-node-3 94 | - valkey-node-4 95 | environment: 96 | - 'VALKEY_PASSWORD=thingsboard' 97 | - 'REDISCLI_AUTH=thingsboard' 98 | - 'VALKEY_NODES=valkey-node-0 valkey-node-1 valkey-node-2 valkey-node-3 valkey-node-4 valkey-node-5' 99 | - 'VALKEY_CLUSTER_REPLICAS=1' 100 | - 'VALKEY_CLUSTER_CREATOR=yes' 101 | 102 | # ThingsBoard setup to use valkey-cluster 103 | tb-monolith: 104 | env_file: 105 | - ../cache-valkey-cluster.env 106 | depends_on: 107 | - valkey-node-5 108 | tb-mqtt-transport: 109 | env_file: 110 | - ../cache-valkey-cluster.env 111 | depends_on: 112 | - valkey-node-5 113 | tb-http-transport: 114 | env_file: 115 | - ../cache-valkey-cluster.env 116 | depends_on: 117 | - valkey-node-5 118 | tb-coap-transport: 119 | env_file: 120 | - ../cache-valkey-cluster.env 121 | depends_on: 122 | - valkey-node-5 123 | tb-lwm2m-transport: 124 | env_file: 125 | - ../cache-valkey-cluster.env 126 | depends_on: 127 | - valkey-node-5 128 | tb-snmp-transport: 129 | env_file: 130 | - ../cache-valkey-cluster.env 131 | depends_on: 132 | - valkey-node-5 133 | tb-vc-executor: 134 | env_file: 135 | - ../cache-valkey-cluster.env 136 | depends_on: 137 | - valkey-node-5 138 | -------------------------------------------------------------------------------- /basic/docker-compose.valkey-sentinel.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | # Valkey sentinel 36 | # The latest version of Valkey compatible with ThingsBoard is 8.0 37 | valkey-primary: 38 | image: 'bitnami/valkey:8.0' 39 | volumes: 40 | - ../tb-node/valkey-sentinel-data-primary:/bitnami/valkey/data 41 | environment: 42 | - 'VALKEY_REPLICATION_MODE=primary' 43 | - 'VALKEY_PASSWORD=thingsboard' 44 | ports: 45 | - '6379' 46 | 47 | valkey-replica: 48 | image: 'bitnami/valkey:8.0' 49 | volumes: 50 | - ../tb-node/valkey-sentinel-data-replica/bitnami/valkey/data 51 | environment: 52 | - 'VALKEY_REPLICATION_MODE=replica' 53 | - 'VALKEY_PRIMARY_HOST=valkey-primary' 54 | - 'VALKEY_PRIMARY_PASSWORD=thingsboard' 55 | - 'VALKEY_PASSWORD=thingsboard' 56 | depends_on: 57 | - valkey-primary 58 | ports: 59 | - '6379' 60 | 61 | valkey-sentinel: 62 | image: 'bitnami/valkey-sentinel:8.0' 63 | volumes: 64 | - ../tb-node/valkey-sentinel-data-sentinel:/bitnami/valkey/data 65 | environment: 66 | - 'VALKEY_PRIMARY_HOST=valkey-primary' 67 | - 'VALKEY_PRIMARY_SET=myprimary' 68 | - 'VALKEY_SENTINEL_PASSWORD=sentinel' 69 | - 'VALKEY_PRIMARY_PASSWORD=thingsboard' 70 | depends_on: 71 | - valkey-primary 72 | - valkey-replica 73 | ports: 74 | - '26379' 75 | 76 | # ThingsBoard setup to use valkey-sentinel 77 | tb-monolith: 78 | env_file: 79 | - ../cache-valkey-sentinel.env 80 | depends_on: 81 | - valkey-sentinel 82 | tb-mqtt-transport: 83 | env_file: 84 | - ../cache-valkey-sentinel.env 85 | depends_on: 86 | - valkey-sentinel 87 | tb-http-transport: 88 | env_file: 89 | - ../cache-valkey-sentinel.env 90 | depends_on: 91 | - valkey-sentinel 92 | tb-coap-transport: 93 | env_file: 94 | - ../cache-valkey-sentinel.env 95 | depends_on: 96 | - valkey-sentinel 97 | tb-lwm2m-transport: 98 | env_file: 99 | - ../cache-valkey-sentinel.env 100 | depends_on: 101 | - valkey-sentinel 102 | tb-snmp-transport: 103 | env_file: 104 | - ../cache-valkey-sentinel.env 105 | depends_on: 106 | - valkey-sentinel 107 | tb-vc-executor: 108 | env_file: 109 | - ../cache-valkey-sentinel.env 110 | depends_on: 111 | - valkey-sentinel 112 | -------------------------------------------------------------------------------- /basic/docker-compose.valkey.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | # Valkey standalone 36 | # The latest version of Valkey compatible with ThingsBoard is 8.0 37 | valkey: 38 | restart: always 39 | image: bitnami/valkey:8.0 40 | environment: 41 | # ALLOW_EMPTY_PASSWORD is recommended only for development. 42 | ALLOW_EMPTY_PASSWORD: "yes" 43 | ports: 44 | - '6379:6379' 45 | volumes: 46 | - ../tb-node/valkey-data:/bitnami/valkey/data 47 | 48 | # ThingsBoard setup to use valkey-standalone 49 | tb-monolith: 50 | env_file: 51 | - ../cache-valkey.env 52 | depends_on: 53 | - valkey 54 | tb-mqtt-transport: 55 | env_file: 56 | - ../cache-valkey.env 57 | depends_on: 58 | - valkey 59 | tb-http-transport: 60 | env_file: 61 | - ../cache-valkey.env 62 | depends_on: 63 | - valkey 64 | tb-coap-transport: 65 | env_file: 66 | - ../cache-valkey.env 67 | depends_on: 68 | - valkey 69 | tb-lwm2m-transport: 70 | env_file: 71 | - ../cache-valkey.env 72 | depends_on: 73 | - valkey 74 | tb-snmp-transport: 75 | env_file: 76 | - ../cache-valkey.env 77 | depends_on: 78 | - valkey 79 | tb-vc-executor: 80 | env_file: 81 | - ../cache-valkey.env 82 | depends_on: 83 | - valkey 84 | -------------------------------------------------------------------------------- /basic/haproxy/config/haproxy.cfg: -------------------------------------------------------------------------------- 1 | #HA Proxy Config 2 | global 3 | ulimit-n 500000 4 | maxconn 99999 5 | maxpipes 99999 6 | tune.maxaccept 500 7 | 8 | log 127.0.0.1 local0 9 | log 127.0.0.1 local1 notice 10 | 11 | ca-base /etc/ssl/certs 12 | crt-base /etc/ssl/private 13 | 14 | ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS 15 | ssl-default-bind-options no-sslv3 16 | 17 | defaults 18 | 19 | log global 20 | 21 | mode http 22 | 23 | timeout connect 5000ms 24 | timeout client 50000ms 25 | timeout server 50000ms 26 | timeout tunnel 1h # timeout to use with WebSocket and CONNECT 27 | 28 | default-server init-addr none 29 | 30 | #enable resolving throught docker dns and avoid crashing if service is down while proxy is starting 31 | resolvers docker_resolver 32 | nameserver dns 127.0.0.11:53 33 | 34 | listen stats 35 | bind *:9999 36 | stats enable 37 | stats hide-version 38 | stats uri /stats 39 | stats auth admin:admin@123 40 | 41 | listen mqtt-in 42 | bind *:${MQTT_PORT} 43 | mode tcp 44 | option clitcpka # For TCP keep-alive 45 | timeout client 3h 46 | timeout server 3h 47 | option tcplog 48 | balance source 49 | server tbMqtt tb-mqtt-transport:1883 check inter 5s resolvers docker_resolver resolve-prefer ipv4 50 | 51 | listen edges-rpc-in 52 | bind *:${EDGES_RPC_PORT} 53 | mode tcp 54 | option clitcpka # For TCP keep-alive 55 | timeout client 3h 56 | timeout server 3h 57 | option tcplog 58 | balance leastconn 59 | server tbEdgesRpc tb-monolith:7070 check inter 5s resolvers docker_resolver resolve-prefer ipv4 60 | 61 | listen integrations-rpc-in 62 | bind *:${INTEGRATIONS_RPC_PORT} 63 | mode tcp 64 | option clitcpka # For TCP keep-alive 65 | timeout client 3h 66 | timeout server 3h 67 | option tcplog 68 | balance leastconn 69 | server tbIntegrationsRpc tb-monolith:9090 check inter 5s resolvers docker_resolver resolve-prefer ipv4 70 | 71 | frontend http-in 72 | bind *:${HTTP_PORT} alpn h2,http/1.1 73 | 74 | option forwardfor 75 | 76 | http-request add-header "X-Forwarded-Proto" "http" 77 | 78 | acl transport_http_acl path_beg /api/v1/ 79 | acl integrations_http_acl path_beg /api/v1/integrations/ 80 | acl letsencrypt_http_acl path_beg /.well-known/acme-challenge/ 81 | acl tb_api_acl path_beg /api/ /swagger /webjars /v2/ /v3/ /static/rulenode/ /oauth2/ /login/oauth2/ /.well-known/assetlinks.json /.well-known/apple-app-site-association 82 | 83 | redirect scheme https if !letsencrypt_http_acl !transport_http_acl { env(FORCE_HTTPS_REDIRECT) -m str true } 84 | 85 | use_backend letsencrypt_http if letsencrypt_http_acl 86 | use_backend tb-http-backend if transport_http_acl !integrations_http_acl 87 | use_backend tb-api-backend if tb_api_acl 88 | 89 | 90 | default_backend tb-web-backend 91 | 92 | frontend https_in 93 | bind *:${HTTPS_PORT} ssl crt /usr/local/etc/haproxy/default.pem crt /usr/local/etc/haproxy/certs.d ciphers ECDHE-RSA-AES256-SHA:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM alpn h2,http/1.1 94 | 95 | option forwardfor 96 | 97 | http-request add-header "X-Forwarded-Proto" "https" 98 | 99 | acl transport_http_acl path_beg /api/v1/ 100 | acl integrations_http_acl path_beg /api/v1/integrations/ 101 | acl tb_api_acl path_beg /api/ /swagger /webjars /v2/ /v3/ /static/rulenode/ /oauth2/ /login/oauth2/ /.well-known/assetlinks.json /.well-known/apple-app-site-association 102 | 103 | use_backend tb-http-backend if transport_http_acl !integrations_http_acl 104 | use_backend tb-api-backend if tb_api_acl 105 | 106 | default_backend tb-web-backend 107 | 108 | frontend web-report-in 109 | bind *:${WEBREPORT_PORT} 110 | 111 | http-request add-header "X-Forwarded-Proto" "http" 112 | 113 | default_backend tb-web-report-backend 114 | 115 | backend letsencrypt_http 116 | server letsencrypt_http_srv 127.0.0.1:8080 117 | 118 | backend tb-web-backend 119 | balance leastconn 120 | option tcp-check 121 | option log-health-checks 122 | server tbWeb tb-monolith:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4 123 | http-request set-header X-Forwarded-Port %[dst_port] 124 | 125 | backend tb-web-report-backend 126 | balance leastconn 127 | option tcp-check 128 | option log-health-checks 129 | server tbWebReport tb-web-report:8383 check inter 5s resolvers docker_resolver resolve-prefer ipv4 130 | http-request set-header X-Forwarded-Port %[dst_port] 131 | 132 | backend tb-http-backend 133 | balance leastconn 134 | option tcp-check 135 | option log-health-checks 136 | server tbHttp tb-http-transport:8081 check inter 5s resolvers docker_resolver resolve-prefer ipv4 137 | 138 | backend tb-api-backend 139 | balance leastconn 140 | option tcp-check 141 | option log-health-checks 142 | server tbApi tb-monolith:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4 143 | http-request set-header X-Forwarded-Port %[dst_port] 144 | -------------------------------------------------------------------------------- /basic/monitoring/grafana/config.monitoring: -------------------------------------------------------------------------------- 1 | GF_SECURITY_ADMIN_PASSWORD=foobar 2 | GF_USERS_ALLOW_SIGN_UP=false 3 | -------------------------------------------------------------------------------- /basic/monitoring/grafana/provisioning/dashboards/dashboard.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | apiVersion: 1 33 | 34 | providers: 35 | - name: 'Prometheus' 36 | orgId: 1 37 | folder: '' 38 | type: file 39 | disableDeletion: false 40 | editable: true 41 | options: 42 | path: /etc/grafana/provisioning/dashboards 43 | -------------------------------------------------------------------------------- /basic/monitoring/grafana/provisioning/datasources/datasource.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | # config file version 33 | apiVersion: 1 34 | 35 | # list of datasources that should be deleted from the database 36 | deleteDatasources: 37 | - name: Prometheus 38 | orgId: 1 39 | 40 | # list of datasources to insert/update depending 41 | # whats available in the database 42 | datasources: 43 | # name of the datasource. Required 44 | - name: Prometheus 45 | # datasource type. Required 46 | type: prometheus 47 | # access mode. direct or proxy. Required 48 | access: proxy 49 | # org id. will default to orgId 1 if not specified 50 | orgId: 1 51 | # url 52 | url: http://prometheus:9090 53 | # database password, if used 54 | password: 55 | # database user, if used 56 | user: 57 | # database name, if used 58 | database: 59 | # enable/disable basic auth 60 | basicAuth: false 61 | # basic auth username, if used 62 | basicAuthUser: 63 | # basic auth password, if used 64 | basicAuthPassword: 65 | # enable/disable with credentials headers 66 | withCredentials: 67 | # mark as default datasource. Max one per org 68 | isDefault: true 69 | # fields that will be converted to json and stored in json_data 70 | jsonData: 71 | graphiteVersion: "1.1" 72 | tlsAuth: false 73 | tlsAuthWithCACert: false 74 | # json object of data that will be encrypted. 75 | secureJsonData: 76 | tlsCACert: "..." 77 | tlsClientCert: "..." 78 | tlsClientKey: "..." 79 | version: 1 80 | # allow users to edit datasources from the UI. 81 | editable: true 82 | -------------------------------------------------------------------------------- /basic/monitoring/prometheus/prometheus.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | # my global config 33 | global: 34 | scrape_interval: 15s # By default, scrape targets every 15 seconds. 35 | evaluation_interval: 15s # By default, scrape targets every 15 seconds. 36 | # scrape_timeout is set to the global default (10s). 37 | 38 | # Attach these labels to any time series or alerts when communicating with 39 | # external systems (federation, remote storage, Alertmanager). 40 | external_labels: 41 | monitor: 'thingsboard' 42 | 43 | 44 | # A scrape configuration containing exactly one endpoint to scrape: 45 | # Here it's Prometheus itself. 46 | scrape_configs: 47 | # The job name is added as a label `job=` to any timeseries scraped from this config. 48 | 49 | - job_name: 'prometheus' 50 | scrape_interval: 5s 51 | static_configs: 52 | - targets: ['localhost:9090'] 53 | 54 | - job_name: 'tb-monolith' 55 | metrics_path: /actuator/prometheus 56 | static_configs: 57 | - targets: [ 'tb-monolith:8080' ] 58 | 59 | - job_name: 'tb-mqtt-transport' 60 | metrics_path: /actuator/prometheus 61 | static_configs: 62 | - targets: [ 'tb-mqtt-transport:8081' ] 63 | 64 | - job_name: 'tb-http-transport' 65 | metrics_path: /actuator/prometheus 66 | static_configs: 67 | - targets: [ 'tb-http-transport:8081' ] 68 | 69 | - job_name: 'tb-coap-transport' 70 | metrics_path: /actuator/prometheus 71 | static_configs: 72 | - targets: [ 'tb-coap-transport:8081' ] 73 | 74 | - job_name: 'tb-lwm2m-transport' 75 | metrics_path: /actuator/prometheus 76 | static_configs: 77 | - targets: [ 'tb-lwm2m-transport:8081' ] 78 | 79 | - job_name: 'tb-snmp-transport' 80 | metrics_path: /actuator/prometheus 81 | static_configs: 82 | - targets: [ 'tb-snmp-transport:8081' ] 83 | -------------------------------------------------------------------------------- /cache-valkey-cluster.env: -------------------------------------------------------------------------------- 1 | CACHE_TYPE=redis 2 | REDIS_CONNECTION_TYPE=cluster 3 | VALKEY_NODES=valkey-node-0:6379,valkey-node-1:6379,valkey-node-2:6379,valkey-node-3:6379,valkey-node-4:6379,valkey-node-5:6379 4 | REDIS_USE_DEFAULT_POOL_CONFIG=false 5 | VALKEY_PASSWORD=thingsboard 6 | -------------------------------------------------------------------------------- /cache-valkey-sentinel.env: -------------------------------------------------------------------------------- 1 | CACHE_TYPE=redis 2 | REDIS_CONNECTION_TYPE=sentinel 3 | REDIS_MASTER=myprimary 4 | REDIS_SENTINELS=valkey-sentinel:26379 5 | REDIS_SENTINEL_PASSWORD=sentinel 6 | REDIS_USE_DEFAULT_POOL_CONFIG=false 7 | REDIS_PASSWORD=thingsboard 8 | -------------------------------------------------------------------------------- /cache-valkey.env: -------------------------------------------------------------------------------- 1 | CACHE_TYPE=redis 2 | REDIS_HOST=valkey 3 | -------------------------------------------------------------------------------- /docker-check-log-folders.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 4 | # 5 | # Copyright © 2016-2022 ThingsBoard, Inc. All Rights Reserved. 6 | # 7 | # NOTICE: All information contained herein is, and remains 8 | # the property of ThingsBoard, Inc. and its suppliers, 9 | # if any. The intellectual and technical concepts contained 10 | # herein are proprietary to ThingsBoard, Inc. 11 | # and its suppliers and may be covered by U.S. and Foreign Patents, 12 | # patents in process, and are protected by trade secret or copyright law. 13 | # 14 | # Dissemination of this information or reproduction of this material is strictly forbidden 15 | # unless prior written permission is obtained from COMPANY. 16 | # 17 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 18 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 19 | # explicitly covering such access. 20 | # 21 | # The copyright notice above does not evidence any actual or intended publication 22 | # or disclosure of this source code, which includes 23 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 24 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 25 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 26 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 27 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 28 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 29 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 30 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 31 | # 32 | 33 | set -e 34 | source compose-utils.sh 35 | if checkFolders "$@" ; then 36 | echo "------" 37 | echo "All checks have passed" 38 | else 39 | CHECK_EXIT_CODE=$? 40 | echo "------" 41 | echo "Some checks did not pass - check the output" 42 | exit $CHECK_EXIT_CODE 43 | fi 44 | -------------------------------------------------------------------------------- /docker-create-log-folders.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 4 | # 5 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 6 | # 7 | # NOTICE: All information contained herein is, and remains 8 | # the property of ThingsBoard, Inc. and its suppliers, 9 | # if any. The intellectual and technical concepts contained 10 | # herein are proprietary to ThingsBoard, Inc. 11 | # and its suppliers and may be covered by U.S. and Foreign Patents, 12 | # patents in process, and are protected by trade secret or copyright law. 13 | # 14 | # Dissemination of this information or reproduction of this material is strictly forbidden 15 | # unless prior written permission is obtained from COMPANY. 16 | # 17 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 18 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 19 | # explicitly covering such access. 20 | # 21 | # The copyright notice above does not evidence any actual or intended publication 22 | # or disclosure of this source code, which includes 23 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 24 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 25 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 26 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 27 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 28 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 29 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 30 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 31 | # 32 | 33 | set -e 34 | source compose-utils.sh 35 | checkFolders --create "$@" 36 | -------------------------------------------------------------------------------- /docker-install-tb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 4 | # 5 | # Copyright © 2016-2022 ThingsBoard, Inc. All Rights Reserved. 6 | # 7 | # NOTICE: All information contained herein is, and remains 8 | # the property of ThingsBoard, Inc. and its suppliers, 9 | # if any. The intellectual and technical concepts contained 10 | # herein are proprietary to ThingsBoard, Inc. 11 | # and its suppliers and may be covered by U.S. and Foreign Patents, 12 | # patents in process, and are protected by trade secret or copyright law. 13 | # 14 | # Dissemination of this information or reproduction of this material is strictly forbidden 15 | # unless prior written permission is obtained from COMPANY. 16 | # 17 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 18 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 19 | # explicitly covering such access. 20 | # 21 | # The copyright notice above does not evidence any actual or intended publication 22 | # or disclosure of this source code, which includes 23 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 24 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 25 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 26 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 27 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 28 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 29 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 30 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 31 | # 32 | 33 | while [[ $# -gt 0 ]] 34 | do 35 | key="$1" 36 | 37 | case $key in 38 | --loadDemo) 39 | LOAD_DEMO=true 40 | shift # past argument 41 | ;; 42 | *) 43 | # unknown option 44 | ;; 45 | esac 46 | shift # past argument or value 47 | done 48 | 49 | if [ "$LOAD_DEMO" == "true" ]; then 50 | loadDemo=true 51 | else 52 | loadDemo=false 53 | fi 54 | 55 | set -e 56 | 57 | source compose-utils.sh 58 | 59 | COMPOSE_VERSION=$(composeVersion) || exit $? 60 | 61 | DEPLOYMENT_FOLDER=$(deploymentFolder) || exit $? 62 | 63 | MAIN_SERVICE_NAME=$(mainServiceName) || exit $? 64 | 65 | ADDITIONAL_COMPOSE_QUEUE_ARGS=$(additionalComposeQueueArgs) || exit $? 66 | 67 | ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $? 68 | 69 | ADDITIONAL_CACHE_ARGS=$(additionalComposeCacheArgs) || exit $? 70 | 71 | ADDITIONAL_COMPOSE_EDQS_ARGS=$(additionalComposeEdqsArgs) || exit $? 72 | 73 | ADDITIONAL_STARTUP_SERVICES=$(additionalStartupServices) || exit $? 74 | 75 | cd $DEPLOYMENT_FOLDER 76 | 77 | if [ ! -z "${ADDITIONAL_STARTUP_SERVICES// }" ]; then 78 | 79 | COMPOSE_ARGS="\ 80 | --env-file ../.env \ 81 | -f docker-compose.yml ${ADDITIONAL_CACHE_ARGS} ${ADDITIONAL_COMPOSE_ARGS} ${ADDITIONAL_COMPOSE_QUEUE_ARGS} ${ADDITIONAL_COMPOSE_EDQS_ARGS} \ 82 | up -d ${ADDITIONAL_STARTUP_SERVICES}" 83 | 84 | case $COMPOSE_VERSION in 85 | V2) 86 | docker compose $COMPOSE_ARGS 87 | ;; 88 | V1) 89 | docker-compose $COMPOSE_ARGS 90 | ;; 91 | *) 92 | # unknown option 93 | ;; 94 | esac 95 | fi 96 | 97 | COMPOSE_ARGS="\ 98 | --env-file ../.env \ 99 | -f docker-compose.yml ${ADDITIONAL_CACHE_ARGS} ${ADDITIONAL_COMPOSE_ARGS} ${ADDITIONAL_COMPOSE_QUEUE_ARGS} \ 100 | run --no-deps --rm -e INSTALL_TB=true -e LOAD_DEMO=${loadDemo} \ 101 | ${MAIN_SERVICE_NAME}" 102 | 103 | case $COMPOSE_VERSION in 104 | V2) 105 | docker compose $COMPOSE_ARGS 106 | ;; 107 | V1) 108 | docker-compose $COMPOSE_ARGS 109 | ;; 110 | *) 111 | # unknown option 112 | ;; 113 | esac 114 | 115 | cd ~- 116 | -------------------------------------------------------------------------------- /docker-remove-services.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 4 | # 5 | # Copyright © 2016-2022 ThingsBoard, Inc. All Rights Reserved. 6 | # 7 | # NOTICE: All information contained herein is, and remains 8 | # the property of ThingsBoard, Inc. and its suppliers, 9 | # if any. The intellectual and technical concepts contained 10 | # herein are proprietary to ThingsBoard, Inc. 11 | # and its suppliers and may be covered by U.S. and Foreign Patents, 12 | # patents in process, and are protected by trade secret or copyright law. 13 | # 14 | # Dissemination of this information or reproduction of this material is strictly forbidden 15 | # unless prior written permission is obtained from COMPANY. 16 | # 17 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 18 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 19 | # explicitly covering such access. 20 | # 21 | # The copyright notice above does not evidence any actual or intended publication 22 | # or disclosure of this source code, which includes 23 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 24 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 25 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 26 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 27 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 28 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 29 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 30 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 31 | # 32 | 33 | set -e 34 | 35 | source compose-utils.sh 36 | 37 | COMPOSE_VERSION=$(composeVersion) || exit $? 38 | 39 | DEPLOYMENT_FOLDER=$(deploymentFolder) || exit $? 40 | 41 | ADDITIONAL_COMPOSE_QUEUE_ARGS=$(additionalComposeQueueArgs) || exit $? 42 | 43 | ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $? 44 | 45 | ADDITIONAL_CACHE_ARGS=$(additionalComposeCacheArgs) || exit $? 46 | 47 | ADDITIONAL_COMPOSE_EDQS_ARGS=$(additionalComposeEdqsArgs) || exit $? 48 | 49 | ADDITIONAL_COMPOSE_MONITORING_ARGS=$(additionalComposeMonitoringArgs) || exit $? 50 | 51 | cd $DEPLOYMENT_FOLDER 52 | 53 | COMPOSE_ARGS="\ 54 | --env-file ../.env \ 55 | -f docker-compose.yml ${ADDITIONAL_CACHE_ARGS} ${ADDITIONAL_COMPOSE_ARGS} ${ADDITIONAL_COMPOSE_QUEUE_ARGS} ${ADDITIONAL_COMPOSE_MONITORING_ARGS} ${ADDITIONAL_COMPOSE_EDQS_ARGS} \ 56 | down -v" 57 | 58 | case $COMPOSE_VERSION in 59 | V2) 60 | docker compose $COMPOSE_ARGS 61 | ;; 62 | V1) 63 | docker-compose $COMPOSE_ARGS 64 | ;; 65 | *) 66 | # unknown option 67 | ;; 68 | esac 69 | 70 | cd ~- 71 | -------------------------------------------------------------------------------- /docker-start-services.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 4 | # 5 | # Copyright © 2016-2022 ThingsBoard, Inc. All Rights Reserved. 6 | # 7 | # NOTICE: All information contained herein is, and remains 8 | # the property of ThingsBoard, Inc. and its suppliers, 9 | # if any. The intellectual and technical concepts contained 10 | # herein are proprietary to ThingsBoard, Inc. 11 | # and its suppliers and may be covered by U.S. and Foreign Patents, 12 | # patents in process, and are protected by trade secret or copyright law. 13 | # 14 | # Dissemination of this information or reproduction of this material is strictly forbidden 15 | # unless prior written permission is obtained from COMPANY. 16 | # 17 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 18 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 19 | # explicitly covering such access. 20 | # 21 | # The copyright notice above does not evidence any actual or intended publication 22 | # or disclosure of this source code, which includes 23 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 24 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 25 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 26 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 27 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 28 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 29 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 30 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 31 | # 32 | 33 | set -e 34 | 35 | source compose-utils.sh 36 | 37 | COMPOSE_VERSION=$(composeVersion) || exit $? 38 | 39 | DEPLOYMENT_FOLDER=$(deploymentFolder) || exit $? 40 | 41 | ADDITIONAL_COMPOSE_QUEUE_ARGS=$(additionalComposeQueueArgs) || exit $? 42 | 43 | ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $? 44 | 45 | ADDITIONAL_CACHE_ARGS=$(additionalComposeCacheArgs) || exit $? 46 | 47 | ADDITIONAL_COMPOSE_EDQS_ARGS=$(additionalComposeEdqsArgs) || exit $? 48 | 49 | ADDITIONAL_COMPOSE_MONITORING_ARGS=$(additionalComposeMonitoringArgs) || exit $? 50 | 51 | cd $DEPLOYMENT_FOLDER 52 | 53 | COMPOSE_ARGS="\ 54 | --env-file ../.env \ 55 | -f docker-compose.yml ${ADDITIONAL_CACHE_ARGS} ${ADDITIONAL_COMPOSE_ARGS} ${ADDITIONAL_COMPOSE_QUEUE_ARGS} ${ADDITIONAL_COMPOSE_MONITORING_ARGS} ${ADDITIONAL_COMPOSE_EDQS_ARGS} \ 56 | up -d" 57 | 58 | case $COMPOSE_VERSION in 59 | V2) 60 | docker compose $COMPOSE_ARGS 61 | ;; 62 | V1) 63 | docker-compose --compatibility $COMPOSE_ARGS 64 | ;; 65 | *) 66 | # unknown option 67 | ;; 68 | esac 69 | 70 | cd ~- 71 | -------------------------------------------------------------------------------- /docker-stop-services.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 4 | # 5 | # Copyright © 2016-2022 ThingsBoard, Inc. All Rights Reserved. 6 | # 7 | # NOTICE: All information contained herein is, and remains 8 | # the property of ThingsBoard, Inc. and its suppliers, 9 | # if any. The intellectual and technical concepts contained 10 | # herein are proprietary to ThingsBoard, Inc. 11 | # and its suppliers and may be covered by U.S. and Foreign Patents, 12 | # patents in process, and are protected by trade secret or copyright law. 13 | # 14 | # Dissemination of this information or reproduction of this material is strictly forbidden 15 | # unless prior written permission is obtained from COMPANY. 16 | # 17 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 18 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 19 | # explicitly covering such access. 20 | # 21 | # The copyright notice above does not evidence any actual or intended publication 22 | # or disclosure of this source code, which includes 23 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 24 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 25 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 26 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 27 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 28 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 29 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 30 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 31 | # 32 | 33 | set -e 34 | 35 | source compose-utils.sh 36 | 37 | COMPOSE_VERSION=$(composeVersion) || exit $? 38 | 39 | DEPLOYMENT_FOLDER=$(deploymentFolder) || exit $? 40 | 41 | ADDITIONAL_COMPOSE_QUEUE_ARGS=$(additionalComposeQueueArgs) || exit $? 42 | 43 | ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $? 44 | 45 | ADDITIONAL_CACHE_ARGS=$(additionalComposeCacheArgs) || exit $? 46 | 47 | ADDITIONAL_COMPOSE_MONITORING_ARGS=$(additionalComposeMonitoringArgs) || exit $? 48 | 49 | cd $DEPLOYMENT_FOLDER 50 | 51 | COMPOSE_ARGS="\ 52 | --env-file ../.env \ 53 | -f docker-compose.yml ${ADDITIONAL_CACHE_ARGS} ${ADDITIONAL_COMPOSE_ARGS} ${ADDITIONAL_COMPOSE_QUEUE_ARGS} ${ADDITIONAL_COMPOSE_MONITORING_ARGS} ${ADDITIONAL_COMPOSE_EDQS_ARGS} \ 54 | stop" 55 | 56 | case $COMPOSE_VERSION in 57 | V2) 58 | docker compose $COMPOSE_ARGS 59 | ;; 60 | V1) 61 | docker-compose $COMPOSE_ARGS 62 | ;; 63 | *) 64 | # unknown option 65 | ;; 66 | esac 67 | 68 | cd ~- 69 | -------------------------------------------------------------------------------- /docker-update-service.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 4 | # 5 | # Copyright © 2016-2022 ThingsBoard, Inc. All Rights Reserved. 6 | # 7 | # NOTICE: All information contained herein is, and remains 8 | # the property of ThingsBoard, Inc. and its suppliers, 9 | # if any. The intellectual and technical concepts contained 10 | # herein are proprietary to ThingsBoard, Inc. 11 | # and its suppliers and may be covered by U.S. and Foreign Patents, 12 | # patents in process, and are protected by trade secret or copyright law. 13 | # 14 | # Dissemination of this information or reproduction of this material is strictly forbidden 15 | # unless prior written permission is obtained from COMPANY. 16 | # 17 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 18 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 19 | # explicitly covering such access. 20 | # 21 | # The copyright notice above does not evidence any actual or intended publication 22 | # or disclosure of this source code, which includes 23 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 24 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 25 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 26 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 27 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 28 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 29 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 30 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 31 | # 32 | 33 | set -e 34 | 35 | source compose-utils.sh 36 | 37 | COMPOSE_VERSION=$(composeVersion) || exit $? 38 | 39 | DEPLOYMENT_FOLDER=$(deploymentFolder) || exit $? 40 | 41 | ADDITIONAL_COMPOSE_QUEUE_ARGS=$(additionalComposeQueueArgs) || exit $? 42 | 43 | ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $? 44 | 45 | ADDITIONAL_CACHE_ARGS=$(additionalComposeCacheArgs) || exit $? 46 | 47 | ADDITIONAL_COMPOSE_EDQS_ARGS=$(additionalComposeEdqsArgs) || exit $? 48 | 49 | cd $DEPLOYMENT_FOLDER 50 | 51 | COMPOSE_ARGS_PULL="\ 52 | --env-file ../.env \ 53 | -f docker-compose.yml ${ADDITIONAL_CACHE_ARGS} ${ADDITIONAL_COMPOSE_ARGS} ${ADDITIONAL_COMPOSE_QUEUE_ARGS} ${ADDITIONAL_COMPOSE_EDQS_ARGS} \ 54 | pull" 55 | 56 | COMPOSE_ARGS_BUILD="\ 57 | --env-file ../.env \ 58 | -f docker-compose.yml ${ADDITIONAL_CACHE_ARGS} ${ADDITIONAL_COMPOSE_ARGS} ${ADDITIONAL_COMPOSE_QUEUE_ARGS} ${ADDITIONAL_COMPOSE_EDQS_ARGS} \ 59 | up -d --no-deps --build" 60 | 61 | case $COMPOSE_VERSION in 62 | V2) 63 | docker compose $COMPOSE_ARGS_PULL $@ 64 | docker compose $COMPOSE_ARGS_BUILD $@ 65 | ;; 66 | V1) 67 | docker-compose $COMPOSE_ARGS_PULL $@ 68 | docker-compose $COMPOSE_ARGS_BUILD $@ 69 | ;; 70 | *) 71 | # unknown option 72 | ;; 73 | esac 74 | 75 | cd ~- 76 | -------------------------------------------------------------------------------- /docker-upgrade-tb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 4 | # 5 | # Copyright © 2016-2022 ThingsBoard, Inc. All Rights Reserved. 6 | # 7 | # NOTICE: All information contained herein is, and remains 8 | # the property of ThingsBoard, Inc. and its suppliers, 9 | # if any. The intellectual and technical concepts contained 10 | # herein are proprietary to ThingsBoard, Inc. 11 | # and its suppliers and may be covered by U.S. and Foreign Patents, 12 | # patents in process, and are protected by trade secret or copyright law. 13 | # 14 | # Dissemination of this information or reproduction of this material is strictly forbidden 15 | # unless prior written permission is obtained from COMPANY. 16 | # 17 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 18 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 19 | # explicitly covering such access. 20 | # 21 | # The copyright notice above does not evidence any actual or intended publication 22 | # or disclosure of this source code, which includes 23 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 24 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 25 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 26 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 27 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 28 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 29 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 30 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 31 | # 32 | 33 | for i in "$@" 34 | do 35 | case $i in 36 | --fromVersion=*) 37 | FROM_VERSION="${i#*=}" 38 | shift 39 | ;; 40 | *) 41 | # unknown option 42 | ;; 43 | esac 44 | done 45 | 46 | fromVersion="${FROM_VERSION// }" 47 | 48 | set -e 49 | 50 | source compose-utils.sh 51 | 52 | COMPOSE_VERSION=$(composeVersion) || exit $? 53 | 54 | DEPLOYMENT_FOLDER=$(deploymentFolder) || exit $? 55 | 56 | MAIN_SERVICE_NAME=$(mainServiceName) || exit $? 57 | 58 | ADDITIONAL_COMPOSE_QUEUE_ARGS=$(additionalComposeQueueArgs) || exit $? 59 | 60 | ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $? 61 | 62 | ADDITIONAL_CACHE_ARGS=$(additionalComposeCacheArgs) || exit $? 63 | 64 | ADDITIONAL_COMPOSE_EDQS_ARGS=$(additionalComposeEdqsArgs) || exit $? 65 | 66 | ADDITIONAL_STARTUP_SERVICES=$(additionalStartupServices) || exit $? 67 | 68 | cd $DEPLOYMENT_FOLDER 69 | 70 | COMPOSE_ARGS_PULL="\ 71 | --env-file ../.env \ 72 | -f docker-compose.yml ${ADDITIONAL_CACHE_ARGS} ${ADDITIONAL_COMPOSE_ARGS} ${ADDITIONAL_COMPOSE_QUEUE_ARGS} ${ADDITIONAL_COMPOSE_EDQS_ARGS} \ 73 | pull \ 74 | ${MAIN_SERVICE_NAME}" 75 | 76 | COMPOSE_ARGS_UP="\ 77 | --env-file ../.env \ 78 | -f docker-compose.yml ${ADDITIONAL_CACHE_ARGS} ${ADDITIONAL_COMPOSE_ARGS} ${ADDITIONAL_COMPOSE_QUEUE_ARGS} ${ADDITIONAL_COMPOSE_EDQS_ARGS} \ 79 | up -d ${ADDITIONAL_STARTUP_SERVICES}" 80 | 81 | COMPOSE_ARGS_RUN="\ 82 | --env-file ../.env \ 83 | -f docker-compose.yml ${ADDITIONAL_CACHE_ARGS} ${ADDITIONAL_COMPOSE_ARGS} ${ADDITIONAL_COMPOSE_QUEUE_ARGS} ${ADDITIONAL_COMPOSE_EDQS_ARGS} \ 84 | run --no-deps --rm -e UPGRADE_TB=true -e FROM_VERSION=${fromVersion} \ 85 | ${MAIN_SERVICE_NAME}" 86 | 87 | case $COMPOSE_VERSION in 88 | V2) 89 | docker compose $COMPOSE_ARGS_PULL 90 | docker compose $COMPOSE_ARGS_UP 91 | docker compose $COMPOSE_ARGS_RUN 92 | ;; 93 | V1) 94 | docker-compose $COMPOSE_ARGS_PULL 95 | docker-compose $COMPOSE_ARGS_UP 96 | docker-compose $COMPOSE_ARGS_RUN 97 | ;; 98 | *) 99 | # unknown option 100 | ;; 101 | esac 102 | 103 | cd ~- 104 | -------------------------------------------------------------------------------- /kafka.env: -------------------------------------------------------------------------------- 1 | # KRaft settings 2 | KAFKA_CFG_NODE_ID=0 3 | KAFKA_CFG_PROCESS_ROLES=controller,broker 4 | KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka:9093 5 | # Listeners 6 | KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093 7 | KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://:9092 8 | KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT 9 | KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER 10 | KAFKA_CFG_INTER_BROKER_LISTENER_NAME=PLAINTEXT 11 | # Kafka settings 12 | KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=false 13 | KAFKA_CFG_LOG_RETENTION_BYTES=1073741824 14 | # Kafka default value: 1 GB. TB value: ~26MB 15 | KAFKA_CFG_SEGMENT_BYTES=26214400 16 | # Kafka default value: 7 days. TB value: 5 min 17 | KAFKA_CFG_LOG_RETENTION_MS=300000 18 | # Kafka default value: delete 19 | #KAFKA_CFG_LOG_CLEANUP_POLICY=delete 20 | -------------------------------------------------------------------------------- /monolith/docker-compose.confluent.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | tb-js-executor: 36 | env_file: 37 | - ../queue-confluent.env 38 | tb-monolith: 39 | env_file: 40 | - ../queue-confluent.env -------------------------------------------------------------------------------- /monolith/docker-compose.hybrid.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | postgres: 36 | restart: always 37 | image: "postgres:16" 38 | ports: 39 | - "5432" 40 | environment: 41 | POSTGRES_DB: thingsboard 42 | POSTGRES_PASSWORD: postgres 43 | volumes: 44 | - ../tb-node/postgres:/var/lib/postgresql/data 45 | cassandra: 46 | restart: always 47 | image: "cassandra:5.0" 48 | ports: 49 | - "9042" 50 | volumes: 51 | - ../tb-node/cassandra:/var/lib/cassandra 52 | tb-monolith: 53 | env_file: 54 | - ../tb-node.hybrid.env 55 | depends_on: 56 | - postgres 57 | - cassandra 58 | -------------------------------------------------------------------------------- /monolith/docker-compose.kafka.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | kafka: 36 | restart: always 37 | image: "bitnami/kafka:4.0" 38 | ports: 39 | - "9092:9092" 40 | env_file: 41 | - ../kafka.env 42 | tb-js-executor: 43 | env_file: 44 | - ../queue-kafka.env 45 | depends_on: 46 | - kafka 47 | tb-monolith: 48 | env_file: 49 | - ../queue-kafka.env 50 | depends_on: 51 | - kafka 52 | -------------------------------------------------------------------------------- /monolith/docker-compose.postgres.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | postgres: 36 | restart: always 37 | image: "postgres:16" 38 | ports: 39 | - "5432" 40 | environment: 41 | POSTGRES_DB: thingsboard 42 | POSTGRES_PASSWORD: postgres 43 | volumes: 44 | - ../tb-node/postgres:/var/lib/postgresql/data 45 | tb-monolith: 46 | env_file: 47 | - ../tb-node.postgres.env 48 | depends_on: 49 | - postgres 50 | -------------------------------------------------------------------------------- /monolith/docker-compose.prometheus-grafana.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | volumes: 35 | prometheus_data: {} 36 | grafana_data: {} 37 | 38 | services: 39 | 40 | prometheus: 41 | image: prom/prometheus:v3.1.0 42 | volumes: 43 | - ./monitoring/prometheus/:/etc/prometheus/ 44 | - prometheus_data:/prometheus 45 | command: 46 | - '--config.file=/etc/prometheus/prometheus.yml' 47 | ports: 48 | - 9090 # PE does not expose this port to avoid port binding conflict with load balancer exposed port 49 | restart: always 50 | grafana: 51 | image: grafana/grafana 52 | user: "472" 53 | depends_on: 54 | - prometheus 55 | ports: 56 | - 3000:3000 57 | volumes: 58 | - grafana_data:/var/lib/grafana 59 | - ./monitoring/grafana/provisioning/:/etc/grafana/provisioning/ 60 | env_file: 61 | - monitoring/grafana/config.monitoring 62 | restart: always -------------------------------------------------------------------------------- /monolith/docker-compose.valkey-cluster.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | # Valkey cluster 36 | # The latest version of Valkey compatible with ThingsBoard is 8.0 37 | valkey-node-0: 38 | image: bitnami/valkey-cluster:8.0 39 | volumes: 40 | - ../tb-node/valkey-cluster-data-0:/bitnami/valkey/data 41 | environment: 42 | - 'VALKEY_PASSWORD=thingsboard' 43 | - 'VALKEY_NODES=valkey-node-0 valkey-node-1 valkey-node-2 valkey-node-3 valkey-node-4 valkey-node-5' 44 | 45 | valkey-node-1: 46 | image: bitnami/valkey-cluster:8.0 47 | volumes: 48 | - ../tb-node/valkey-cluster-data-1:/bitnami/valkey/data 49 | depends_on: 50 | - valkey-node-0 51 | environment: 52 | - 'VALKEY_PASSWORD=thingsboard' 53 | - 'VALKEY_NODES=valkey-node-0 valkey-node-1 valkey-node-2 valkey-node-3 valkey-node-4 valkey-node-5' 54 | 55 | valkey-node-2: 56 | image: bitnami/valkey-cluster:8.0 57 | volumes: 58 | - ../tb-node/valkey-cluster-data-2:/bitnami/valkey/data 59 | depends_on: 60 | - valkey-node-1 61 | environment: 62 | - 'VALKEY_PASSWORD=thingsboard' 63 | - 'VALKEY_NODES=valkey-node-0 valkey-node-1 valkey-node-2 valkey-node-3 valkey-node-4 valkey-node-5' 64 | 65 | valkey-node-3: 66 | image: bitnami/valkey-cluster:8.0 67 | volumes: 68 | - ../tb-node/valkey-cluster-data-3:/bitnami/valkey/data 69 | depends_on: 70 | - valkey-node-2 71 | environment: 72 | - 'VALKEY_PASSWORD=thingsboard' 73 | - 'VALKEY_NODES=valkey-node-0 valkey-node-1 valkey-node-2 valkey-node-3 valkey-node-4 valkey-node-5' 74 | 75 | valkey-node-4: 76 | image: bitnami/valkey-cluster:8.0 77 | volumes: 78 | - ../tb-node/valkey-cluster-data-4:/bitnami/valkey/data 79 | depends_on: 80 | - valkey-node-3 81 | environment: 82 | - 'VALKEY_PASSWORD=thingsboard' 83 | - 'VALKEY_NODES=valkey-node-0 valkey-node-1 valkey-node-2 valkey-node-3 valkey-node-4 valkey-node-5' 84 | 85 | valkey-node-5: 86 | image: bitnami/valkey-cluster:8.0 87 | volumes: 88 | - ../tb-node/valkey-cluster-data-5:/bitnami/valkey/data 89 | depends_on: 90 | - valkey-node-0 91 | - valkey-node-1 92 | - valkey-node-2 93 | - valkey-node-3 94 | - valkey-node-4 95 | environment: 96 | - 'VALKEY_PASSWORD=thingsboard' 97 | - 'REDISCLI_AUTH=thingsboard' 98 | - 'VALKEY_NODES=valkey-node-0 valkey-node-1 valkey-node-2 valkey-node-3 valkey-node-4 valkey-node-5' 99 | - 'VALKEY_CLUSTER_REPLICAS=1' 100 | - 'VALKEY_CLUSTER_CREATOR=yes' 101 | 102 | # ThingsBoard setup to use valkey-cluster 103 | tb-monolith: 104 | env_file: 105 | - ../cache-valkey-cluster.env 106 | depends_on: 107 | - valkey-node-5 108 | -------------------------------------------------------------------------------- /monolith/docker-compose.valkey-sentinel.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | # Valkey sentinel 36 | # The latest version of valkey compatible with ThingsBoard is 8.0 37 | valkey-primary: 38 | image: 'bitnami/valkey:8.0' 39 | volumes: 40 | - ../tb-node/valkey-sentinel-data-primary:/bitnami/valkey/data 41 | environment: 42 | - 'VALKEY_REPLICATION_MODE=primary' 43 | - 'VALKEY_PASSWORD=thingsboard' 44 | 45 | valkey-replica: 46 | image: 'bitnami/valkey:8.0' 47 | volumes: 48 | - ../tb-node/valkey-sentinel-data-replica:/bitnami/valkey/data 49 | environment: 50 | - 'VALKEY_REPLICATION_MODE=replica' 51 | - 'VALKEY_PRIMARY_HOST=valkey-primary' 52 | - 'VALKEY_PRIMARY_PASSWORD=thingsboard' 53 | - 'VALKEY_PASSWORD=thingsboard' 54 | depends_on: 55 | - valkey-primary 56 | 57 | valkey-sentinel: 58 | image: 'bitnami/valkey-sentinel:8.0' 59 | volumes: 60 | - ../tb-node/valkey-sentinel-data-sentinel:/bitnami/valkey/data 61 | environment: 62 | - 'VALKEY_PRIMARY_HOST=valkey-primary' 63 | - 'VALKEY_PRIMARY_SET=myprimary' 64 | - 'VALKEY_SENTINEL_PASSWORD=sentinel' 65 | - 'VALKEY_PRIMARY_PASSWORD=thingsboard' 66 | depends_on: 67 | - valkey-primary 68 | - valkey-replica 69 | 70 | # ThingsBoard setup to use valkey-sentinel 71 | tb-monolith: 72 | env_file: 73 | - ../cache-valkey-sentinel.env 74 | depends_on: 75 | - valkey-sentinel 76 | -------------------------------------------------------------------------------- /monolith/docker-compose.valkey.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | # Valkey standalone 36 | # The latest version of Valkey compatible with ThingsBoard is 8.0 37 | valkey: 38 | restart: always 39 | image: bitnami/valkey:8.0 40 | environment: 41 | # ALLOW_EMPTY_PASSWORD is recommended only for development. 42 | ALLOW_EMPTY_PASSWORD: "yes" 43 | ports: 44 | - '6379:6379' 45 | volumes: 46 | - ../tb-node/valkey-data:/bitnami/valkey/data 47 | 48 | # ThingsBoard setup to use valkey-standalone 49 | tb-monolith: 50 | env_file: 51 | - ../cache-valkey.env 52 | depends_on: 53 | - valkey 54 | -------------------------------------------------------------------------------- /monolith/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | version: '3.0' 33 | 34 | services: 35 | zookeeper: 36 | restart: always 37 | image: "zookeeper:3.8.1" 38 | ports: 39 | - "2181" 40 | environment: 41 | ZOO_MY_ID: 1 42 | ZOO_SERVERS: server.1=zookeeper:2888:3888;zookeeper:2181 43 | ZOO_ADMINSERVER_ENABLED: "false" 44 | tb-js-executor: 45 | restart: always 46 | image: "${DOCKER_REPO}/${JS_EXECUTOR_DOCKER_NAME}:${TB_VERSION}" 47 | deploy: 48 | replicas: 10 49 | env_file: 50 | - ../tb-js-executor.env 51 | tb-monolith: 52 | restart: always 53 | image: "${DOCKER_REPO}/${TB_NODE_DOCKER_NAME}:${TB_VERSION}" 54 | ports: 55 | - "8080" 56 | - "7070" 57 | - "9090" 58 | - "1883" 59 | - "5683:5683/udp" 60 | - "5685:5685/udp" 61 | - "5686:5686/udp" 62 | - "5687:5687/udp" 63 | - "5688:5688/udp" 64 | logging: 65 | driver: "json-file" 66 | options: 67 | max-size: "200m" 68 | max-file: "30" 69 | environment: 70 | TB_SERVICE_ID: tb-monolith 71 | TB_SERVICE_TYPE: monolith 72 | EDGES_ENABLED: "true" 73 | JAVA_OPTS: "${JAVA_OPTS}" 74 | env_file: 75 | - ../tb-node.env 76 | volumes: 77 | - ../tb-node/conf:/config 78 | - ../tb-node/log:/var/log/thingsboard 79 | - ../tb-node/data:/data 80 | depends_on: 81 | - zookeeper 82 | - tb-js-executor 83 | tb-web-report: 84 | restart: always 85 | image: "${DOCKER_REPO}/${WEB_REPORT_DOCKER_NAME}:${TB_VERSION}" 86 | ports: 87 | - "8383" 88 | env_file: 89 | - ../tb-web-report.env 90 | haproxy: 91 | restart: always 92 | container_name: "${LOAD_BALANCER_NAME}" 93 | image: thingsboard/haproxy-certbot:2.2.33-alpine 94 | volumes: 95 | - ./haproxy/config:/config 96 | - ./haproxy/letsencrypt:/etc/letsencrypt 97 | - ./haproxy/certs.d:/usr/local/etc/haproxy/certs.d 98 | ports: 99 | - "80:80" 100 | - "443:443" 101 | - "1883:1883" 102 | - "7070:7070" 103 | - "9090:9090" 104 | - "9999:9999" 105 | cap_add: 106 | - NET_ADMIN 107 | environment: 108 | HTTP_PORT: 80 109 | HTTPS_PORT: 443 110 | MQTT_PORT: 1883 111 | EDGES_RPC_PORT: 7070 112 | INTEGRATIONS_RPC_PORT: 9090 113 | WEBREPORT_PORT: 8383 114 | FORCE_HTTPS_REDIRECT: "false" 115 | links: 116 | - tb-monolith 117 | - tb-web-report 118 | -------------------------------------------------------------------------------- /monolith/haproxy/config/haproxy.cfg: -------------------------------------------------------------------------------- 1 | #HA Proxy Config 2 | global 3 | ulimit-n 500000 4 | maxconn 99999 5 | maxpipes 99999 6 | tune.maxaccept 500 7 | 8 | log 127.0.0.1 local0 9 | log 127.0.0.1 local1 notice 10 | 11 | ca-base /etc/ssl/certs 12 | crt-base /etc/ssl/private 13 | 14 | ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS 15 | ssl-default-bind-options no-sslv3 16 | 17 | defaults 18 | 19 | log global 20 | 21 | mode http 22 | 23 | timeout connect 5000ms 24 | timeout client 50000ms 25 | timeout server 50000ms 26 | timeout tunnel 1h # timeout to use with WebSocket and CONNECT 27 | 28 | default-server init-addr none 29 | 30 | #enable resolving throught docker dns and avoid crashing if service is down while proxy is starting 31 | resolvers docker_resolver 32 | nameserver dns 127.0.0.11:53 33 | 34 | listen stats 35 | bind *:9999 36 | stats enable 37 | stats hide-version 38 | stats uri /stats 39 | stats auth admin:admin@123 40 | 41 | listen mqtt-in 42 | bind *:${MQTT_PORT} 43 | mode tcp 44 | option clitcpka # For TCP keep-alive 45 | timeout client 3h 46 | timeout server 3h 47 | option tcplog 48 | balance source 49 | server tbMqtt tb-monolith:1883 check inter 5s resolvers docker_resolver resolve-prefer ipv4 50 | 51 | listen edges-rpc-in 52 | bind *:${EDGES_RPC_PORT} 53 | mode tcp 54 | option clitcpka # For TCP keep-alive 55 | timeout client 3h 56 | timeout server 3h 57 | option tcplog 58 | balance leastconn 59 | server tbEdgesRpc tb-monolith:7070 check inter 5s resolvers docker_resolver resolve-prefer ipv4 60 | 61 | listen integrations-rpc-in 62 | bind *:${INTEGRATIONS_RPC_PORT} 63 | mode tcp 64 | option clitcpka # For TCP keep-alive 65 | timeout client 3h 66 | timeout server 3h 67 | option tcplog 68 | balance leastconn 69 | server tbIntegrationsRpc tb-monolith:9090 check inter 5s resolvers docker_resolver resolve-prefer ipv4 70 | 71 | frontend http-in 72 | bind *:${HTTP_PORT} alpn h2,http/1.1 73 | 74 | option forwardfor 75 | 76 | http-request add-header "X-Forwarded-Proto" "http" 77 | 78 | acl transport_http_acl path_beg /api/v1/ 79 | acl integrations_http_acl path_beg /api/v1/integrations/ 80 | acl letsencrypt_http_acl path_beg /.well-known/acme-challenge/ 81 | acl tb_api_acl path_beg /api/ /swagger /webjars /v2/ /v3/ /static/rulenode/ /oauth2/ /login/oauth2/ /.well-known/assetlinks.json /.well-known/apple-app-site-association 82 | 83 | redirect scheme https if !letsencrypt_http_acl !transport_http_acl { env(FORCE_HTTPS_REDIRECT) -m str true } 84 | 85 | use_backend letsencrypt_http if letsencrypt_http_acl 86 | use_backend tb-http-backend if transport_http_acl !integrations_http_acl 87 | use_backend tb-api-backend if tb_api_acl 88 | 89 | default_backend tb-web-backend 90 | 91 | frontend https_in 92 | bind *:${HTTPS_PORT} ssl crt /usr/local/etc/haproxy/default.pem crt /usr/local/etc/haproxy/certs.d ciphers ECDHE-RSA-AES256-SHA:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM alpn h2,http/1.1 93 | 94 | option forwardfor 95 | 96 | http-request add-header "X-Forwarded-Proto" "https" 97 | 98 | acl transport_http_acl path_beg /api/v1/ 99 | acl integrations_http_acl path_beg /api/v1/integrations/ 100 | acl tb_api_acl path_beg /api/ /swagger /webjars /v2/ /v3/ /static/rulenode/ /oauth2/ /login/oauth2/ /.well-known/assetlinks.json /.well-known/apple-app-site-association 101 | 102 | use_backend tb-http-backend if transport_http_acl !integrations_http_acl 103 | use_backend tb-api-backend if tb_api_acl 104 | 105 | default_backend tb-web-backend 106 | 107 | frontend web-report-in 108 | bind *:${WEBREPORT_PORT} 109 | 110 | http-request add-header "X-Forwarded-Proto" "http" 111 | 112 | default_backend tb-web-report-backend 113 | 114 | backend letsencrypt_http 115 | server letsencrypt_http_srv 127.0.0.1:8080 116 | 117 | backend tb-web-backend 118 | balance leastconn 119 | option tcp-check 120 | option log-health-checks 121 | server tbWeb tb-monolith:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4 122 | http-request set-header X-Forwarded-Port %[dst_port] 123 | 124 | backend tb-web-report-backend 125 | balance leastconn 126 | option tcp-check 127 | option log-health-checks 128 | server tbWebReport tb-web-report:8383 check inter 5s resolvers docker_resolver resolve-prefer ipv4 129 | http-request set-header X-Forwarded-Port %[dst_port] 130 | 131 | backend tb-http-backend 132 | balance leastconn 133 | option tcp-check 134 | option log-health-checks 135 | server tbHttp tb-monolith:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4 136 | 137 | backend tb-api-backend 138 | balance leastconn 139 | option tcp-check 140 | option log-health-checks 141 | server tbApi tb-monolith:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4 142 | http-request set-header X-Forwarded-Port %[dst_port] 143 | -------------------------------------------------------------------------------- /monolith/monitoring/grafana/config.monitoring: -------------------------------------------------------------------------------- 1 | GF_SECURITY_ADMIN_PASSWORD=foobar 2 | GF_USERS_ALLOW_SIGN_UP=false 3 | -------------------------------------------------------------------------------- /monolith/monitoring/grafana/provisioning/dashboards/dashboard.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | apiVersion: 1 33 | 34 | providers: 35 | - name: 'Prometheus' 36 | orgId: 1 37 | folder: '' 38 | type: file 39 | disableDeletion: false 40 | editable: true 41 | options: 42 | path: /etc/grafana/provisioning/dashboards 43 | -------------------------------------------------------------------------------- /monolith/monitoring/grafana/provisioning/datasources/datasource.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | # config file version 33 | apiVersion: 1 34 | 35 | # list of datasources that should be deleted from the database 36 | deleteDatasources: 37 | - name: Prometheus 38 | orgId: 1 39 | 40 | # list of datasources to insert/update depending 41 | # whats available in the database 42 | datasources: 43 | # name of the datasource. Required 44 | - name: Prometheus 45 | # datasource type. Required 46 | type: prometheus 47 | # access mode. direct or proxy. Required 48 | access: proxy 49 | # org id. will default to orgId 1 if not specified 50 | orgId: 1 51 | # url 52 | url: http://prometheus:9090 53 | # database password, if used 54 | password: 55 | # database user, if used 56 | user: 57 | # database name, if used 58 | database: 59 | # enable/disable basic auth 60 | basicAuth: false 61 | # basic auth username, if used 62 | basicAuthUser: 63 | # basic auth password, if used 64 | basicAuthPassword: 65 | # enable/disable with credentials headers 66 | withCredentials: 67 | # mark as default datasource. Max one per org 68 | isDefault: true 69 | # fields that will be converted to json and stored in json_data 70 | jsonData: 71 | graphiteVersion: "1.1" 72 | tlsAuth: false 73 | tlsAuthWithCACert: false 74 | # json object of data that will be encrypted. 75 | secureJsonData: 76 | tlsCACert: "..." 77 | tlsClientCert: "..." 78 | tlsClientKey: "..." 79 | version: 1 80 | # allow users to edit datasources from the UI. 81 | editable: true 82 | -------------------------------------------------------------------------------- /monolith/monitoring/prometheus/prometheus.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2019 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | # my global config 33 | global: 34 | scrape_interval: 15s # By default, scrape targets every 15 seconds. 35 | evaluation_interval: 15s # By default, scrape targets every 15 seconds. 36 | # scrape_timeout is set to the global default (10s). 37 | 38 | # Attach these labels to any time series or alerts when communicating with 39 | # external systems (federation, remote storage, Alertmanager). 40 | external_labels: 41 | monitor: 'thingsboard' 42 | 43 | 44 | # A scrape configuration containing exactly one endpoint to scrape: 45 | # Here it's Prometheus itself. 46 | scrape_configs: 47 | # The job name is added as a label `job=` to any timeseries scraped from this config. 48 | 49 | - job_name: 'prometheus' 50 | scrape_interval: 5s 51 | static_configs: 52 | - targets: ['localhost:9090'] 53 | 54 | - job_name: 'tb-monolith' 55 | metrics_path: /actuator/prometheus 56 | static_configs: 57 | - targets: [ 'tb-monolith:8080' ] 58 | -------------------------------------------------------------------------------- /queue-confluent.env: -------------------------------------------------------------------------------- 1 | TB_QUEUE_TYPE=kafka 2 | 3 | TB_KAFKA_SERVERS=confluent.cloud:9092 4 | TB_QUEUE_KAFKA_REPLICATION_FACTOR=3 5 | 6 | TB_QUEUE_KAFKA_USE_CONFLUENT_CLOUD=true 7 | TB_QUEUE_KAFKA_CONFLUENT_SSL_ALGORITHM=https 8 | TB_QUEUE_KAFKA_CONFLUENT_SASL_MECHANISM=PLAIN 9 | TB_QUEUE_KAFKA_CONFLUENT_SASL_JAAS_CONFIG=org.apache.kafka.common.security.plain.PlainLoginModule required username="CLUSTER_API_KEY" password="CLUSTER_API_SECRET"; 10 | TB_QUEUE_KAFKA_CONFLUENT_SECURITY_PROTOCOL=SASL_SSL 11 | TB_QUEUE_KAFKA_CONFLUENT_USERNAME=CLUSTER_API_KEY 12 | TB_QUEUE_KAFKA_CONFLUENT_PASSWORD=CLUSTER_API_SECRET 13 | 14 | TB_QUEUE_KAFKA_RE_TOPIC_PROPERTIES=retention.ms:604800000;segment.bytes:52428800;retention.bytes:1048576000 15 | TB_QUEUE_KAFKA_CORE_TOPIC_PROPERTIES=retention.ms:604800000;segment.bytes:52428800;retention.bytes:1048576000 16 | TB_QUEUE_KAFKA_TA_TOPIC_PROPERTIES=retention.ms:604800000;segment.bytes:52428800;retention.bytes:1048576000 17 | TB_QUEUE_KAFKA_NOTIFICATIONS_TOPIC_PROPERTIES=retention.ms:604800000;segment.bytes:52428800;retention.bytes:1048576000 18 | TB_QUEUE_KAFKA_JE_TOPIC_PROPERTIES=retention.ms:604800000;segment.bytes:52428800;retention.bytes:104857600 19 | -------------------------------------------------------------------------------- /queue-kafka.env: -------------------------------------------------------------------------------- 1 | TB_QUEUE_TYPE=kafka 2 | TB_KAFKA_SERVERS=kafka:9092 3 | -------------------------------------------------------------------------------- /tb-coap-transport.env: -------------------------------------------------------------------------------- 1 | ZOOKEEPER_ENABLED=true 2 | ZOOKEEPER_URL=zookeeper:2181 3 | 4 | COAP_BIND_ADDRESS=0.0.0.0 5 | COAP_BIND_PORT=5683 6 | COAP_TIMEOUT=10000 7 | 8 | METRICS_ENABLED=true 9 | METRICS_ENDPOINTS_EXPOSE=prometheus 10 | WEB_APPLICATION_ENABLE=true 11 | WEB_APPLICATION_TYPE=servlet 12 | HTTP_BIND_PORT=8081 13 | -------------------------------------------------------------------------------- /tb-core-edqs.env: -------------------------------------------------------------------------------- 1 | # ThingsBoard server configuration with enabled EDQS synchronization 2 | 3 | TB_EDQS_SYNC_ENABLED=true 4 | TB_EDQS_API_SUPPORTED=true 5 | TB_EDQS_MODE=remote -------------------------------------------------------------------------------- /tb-edqs.env: -------------------------------------------------------------------------------- 1 | ZOOKEEPER_ENABLED=true 2 | ZOOKEEPER_URL=zookeeper:2181 3 | TB_KAFKA_SERVERS=kafka:9092 4 | 5 | METRICS_ENABLED=true 6 | METRICS_ENDPOINTS_EXPOSE=prometheus -------------------------------------------------------------------------------- /tb-edqs/conf/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 34 | 35 | 36 | 37 | 39 | /var/log/tb-edqs/${TB_SERVICE_ID}/tb-edqs.log 40 | 42 | /var/log/tb-edqs/${TB_SERVICE_ID}/tb-edqs.%d{yyyy-MM-dd}.%i.log 43 | 100MB 44 | 30 45 | 3GB 46 | 47 | 48 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 49 | 50 | 51 | 52 | 53 | 54 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /tb-edqs/conf/tb-edqs.conf: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2025 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | export JAVA_OPTS="$JAVA_OPTS -Xlog:gc*,heap*,age*,safepoint=debug:file=/var/log/tb-edqs/${TB_SERVICE_ID}-gc.log:time,uptime,level,tags:filecount=10,filesize=10M" 33 | export JAVA_OPTS="$JAVA_OPTS -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError" 34 | export JAVA_OPTS="$JAVA_OPTS -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark" 35 | export JAVA_OPTS="$JAVA_OPTS -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:MaxTenuringThreshold=10" 36 | export LOG_FILENAME=tb-edqs.out 37 | export LOADER_PATH=/usr/share/tb-edqs/conf 38 | -------------------------------------------------------------------------------- /tb-http-transport.env: -------------------------------------------------------------------------------- 1 | ZOOKEEPER_ENABLED=true 2 | ZOOKEEPER_URL=zookeeper:2181 3 | 4 | HTTP_BIND_ADDRESS=0.0.0.0 5 | HTTP_BIND_PORT=8081 6 | HTTP_REQUEST_TIMEOUT=60000 7 | 8 | METRICS_ENABLED=true 9 | METRICS_ENDPOINTS_EXPOSE=prometheus 10 | -------------------------------------------------------------------------------- /tb-integration-executor.env: -------------------------------------------------------------------------------- 1 | ZOOKEEPER_ENABLED=true 2 | ZOOKEEPER_URL=zookeeper:2181 3 | 4 | JS_EVALUATOR=remote 5 | -------------------------------------------------------------------------------- /tb-integration-executor/conf/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 24 | /var/log/tb-integration-executor/${TB_SERVICE_ID}/tb-integration-executor.log 25 | 27 | /var/log/tb-integration-executor/${TB_SERVICE_ID}/tb-integration-executor.%d{yyyy-MM-dd}.%i.log 28 | 100MB 29 | 30 30 | 3GB 31 | 32 | 33 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 34 | 35 | 36 | 37 | 38 | 39 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /tb-integration-executor/conf/tb-integration-executor.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright © 2016-2018 The Thingsboard Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | export JAVA_OPTS="$JAVA_OPTS -Xlog:gc*,heap*,age*,safepoint=debug:file=/var/log/tb-integration-executor/${TB_SERVICE_ID}-gc.log:time,uptime,level,tags:filecount=10,filesize=10M" 18 | export JAVA_OPTS="$JAVA_OPTS -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/tb-integration-executor/${TB_SERVICE_ID}-heapdump.bin" 19 | export JAVA_OPTS="$JAVA_OPTS -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark" 20 | export JAVA_OPTS="$JAVA_OPTS -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:MaxTenuringThreshold=10" 21 | export JAVA_OPTS="$JAVA_OPTS -XX:+ExitOnOutOfMemoryError" 22 | export LOG_FILENAME=tb-integration-executor.out 23 | export LOADER_PATH=/usr/share/tb-integration-executor/conf -------------------------------------------------------------------------------- /tb-js-executor.env: -------------------------------------------------------------------------------- 1 | REMOTE_JS_EVAL_REQUEST_TOPIC=js_eval.requests 2 | LOGGER_LEVEL=info 3 | LOG_FOLDER=logs 4 | LOGGER_FILENAME=tb-js-executor-%DATE%.log 5 | DOCKER_MODE=true 6 | SCRIPT_BODY_TRACE_FREQUENCY=1000 7 | NODE_OPTIONS="--max-old-space-size=200" 8 | -------------------------------------------------------------------------------- /tb-lwm2m-transport.env: -------------------------------------------------------------------------------- 1 | ZOOKEEPER_ENABLED=true 2 | ZOOKEEPER_URL=zookeeper:2181 3 | 4 | LWM2M_BIND_ADDRESS=0.0.0.0 5 | LWM2M_BIND_PORT=5685 6 | LWM2M_TIMEOUT=10000 7 | 8 | METRICS_ENABLED=true 9 | METRICS_ENDPOINTS_EXPOSE=prometheus 10 | WEB_APPLICATION_ENABLE=true 11 | WEB_APPLICATION_TYPE=servlet 12 | HTTP_BIND_PORT=8081 13 | -------------------------------------------------------------------------------- /tb-mqtt-transport.env: -------------------------------------------------------------------------------- 1 | ZOOKEEPER_ENABLED=true 2 | ZOOKEEPER_URL=zookeeper:2181 3 | 4 | MQTT_BIND_ADDRESS=0.0.0.0 5 | MQTT_BIND_PORT=1883 6 | MQTT_TIMEOUT=10000 7 | 8 | METRICS_ENABLED=true 9 | METRICS_ENDPOINTS_EXPOSE=prometheus 10 | WEB_APPLICATION_ENABLE=true 11 | WEB_APPLICATION_TYPE=servlet 12 | HTTP_BIND_PORT=8081 13 | -------------------------------------------------------------------------------- /tb-node.env: -------------------------------------------------------------------------------- 1 | # ThingsBoard server configuration 2 | 3 | ZOOKEEPER_ENABLED=true 4 | ZOOKEEPER_URL=zookeeper:2181 5 | JS_EVALUATOR=remote 6 | TRANSPORT_TYPE=remote 7 | 8 | REPORTS_SERVER_ENDPOINT_URL=http://haproxy:8383 9 | TB_LICENSE_INSTANCE_DATA_FILE=/data/instance-license-${TB_SERVICE_ID}.data 10 | 11 | HTTP_LOG_CONTROLLER_ERROR_STACK_TRACE=false 12 | 13 | TB_QUEUE_PARTITIONS_VIRTUAL_NODES_SIZE=256 14 | 15 | METRICS_ENABLED=true 16 | METRICS_ENDPOINTS_EXPOSE=prometheus 17 | 18 | TB_LICENSE_SECRET=YOUR_LICENSE_KEY_HERE 19 | -------------------------------------------------------------------------------- /tb-node.hybrid.env: -------------------------------------------------------------------------------- 1 | # ThingsBoard server configuration for Cassandra database 2 | 3 | DATABASE_TS_TYPE=cassandra 4 | CASSANDRA_URL=cassandra:9042 5 | SPRING_DRIVER_CLASS_NAME=org.postgresql.Driver 6 | SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/thingsboard 7 | SPRING_DATASOURCE_USERNAME=postgres 8 | SPRING_DATASOURCE_PASSWORD=postgres 9 | -------------------------------------------------------------------------------- /tb-node.postgres.env: -------------------------------------------------------------------------------- 1 | # ThingsBoard server configuration for PostgreSQL database 2 | 3 | DATABASE_TS_TYPE=sql 4 | SPRING_DRIVER_CLASS_NAME=org.postgresql.Driver 5 | SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/thingsboard 6 | SPRING_DATASOURCE_USERNAME=postgres 7 | SPRING_DATASOURCE_PASSWORD=postgres 8 | -------------------------------------------------------------------------------- /tb-node/conf/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 24 | /var/log/thingsboard/${TB_SERVICE_ID}/thingsboard.log 25 | 27 | /var/log/thingsboard/${TB_SERVICE_ID}/thingsboard.%d{yyyy-MM-dd}.%i.log 28 | 100MB 29 | 30 30 | 3GB 31 | 32 | 33 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 34 | 35 | 36 | 37 | 38 | 39 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /tb-node/conf/recaptcha.properties: -------------------------------------------------------------------------------- 1 | recaptcha.verification_url=https://www.google.com/recaptcha/api/siteverify 2 | 3 | -------------------------------------------------------------------------------- /tb-node/conf/thingsboard.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright © 2016-2018 The Thingsboard Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | export JAVA_OPTS="$JAVA_OPTS -Dplatform=deb -Dinstall.data_dir=/usr/share/thingsboard/data" 18 | export JAVA_OPTS="$JAVA_OPTS -Xlog:gc*,heap*,age*,safepoint=debug:file=/var/log/thingsboard/${TB_SERVICE_ID}-gc.log:time,uptime,level,tags:filecount=10,filesize=10M" 19 | export JAVA_OPTS="$JAVA_OPTS -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/thingsboard/${TB_SERVICE_ID}-heapdump.bin" 20 | export JAVA_OPTS="$JAVA_OPTS -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark" 21 | export JAVA_OPTS="$JAVA_OPTS -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:MaxTenuringThreshold=10" 22 | export JAVA_OPTS="$JAVA_OPTS -XX:+ExitOnOutOfMemoryError" 23 | export LOG_FILENAME=thingsboard.out 24 | export LOADER_PATH=/usr/share/thingsboard/conf,/usr/share/thingsboard/extensions 25 | -------------------------------------------------------------------------------- /tb-rule-engine-edqs.env: -------------------------------------------------------------------------------- 1 | # ThingsBoard server configuration with enabled EDQS synchronization 2 | 3 | TB_EDQS_SYNC_ENABLED=true -------------------------------------------------------------------------------- /tb-snmp-transport.env: -------------------------------------------------------------------------------- 1 | ZOOKEEPER_ENABLED=true 2 | ZOOKEEPER_URL=zookeeper:2181 3 | 4 | SNMP_BIND_PORT=1620 5 | METRICS_ENABLED=true 6 | METRICS_ENDPOINTS_EXPOSE=prometheus 7 | WEB_APPLICATION_ENABLE=true 8 | WEB_APPLICATION_TYPE=servlet 9 | HTTP_BIND_PORT=8081 10 | -------------------------------------------------------------------------------- /tb-transports/coap/conf/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 34 | 35 | 36 | 37 | 39 | /var/log/tb-coap-transport/${TB_SERVICE_ID}/tb-coap-transport.log 40 | 42 | /var/log/tb-coap-transport/${TB_SERVICE_ID}/tb-coap-transport.%d{yyyy-MM-dd}.%i.log 43 | 100MB 44 | 30 45 | 3GB 46 | 47 | 48 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 49 | 50 | 51 | 52 | 53 | 54 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /tb-transports/coap/conf/tb-coap-transport.conf: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2021 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | export JAVA_OPTS="$JAVA_OPTS -Xlog:gc*,heap*,age*,safepoint=debug:file=/var/log/tb-coap-transport/${TB_SERVICE_ID}-gc.log:time,uptime,level,tags:filecount=10,filesize=10M" 33 | export JAVA_OPTS="$JAVA_OPTS -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/tb-coap-transport/${TB_SERVICE_ID}-heapdump.bin" 34 | export JAVA_OPTS="$JAVA_OPTS -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark" 35 | export JAVA_OPTS="$JAVA_OPTS -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:MaxTenuringThreshold=10" 36 | export JAVA_OPTS="$JAVA_OPTS -XX:+ExitOnOutOfMemoryError" 37 | export LOG_FILENAME=tb-coap-transport.out 38 | export LOADER_PATH=/usr/share/tb-coap-transport/conf 39 | -------------------------------------------------------------------------------- /tb-transports/http/conf/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 34 | 35 | 36 | 37 | 39 | /var/log/tb-http-transport/${TB_SERVICE_ID}/tb-http-transport.log 40 | 42 | /var/log/tb-http-transport/${TB_SERVICE_ID}/tb-http-transport.%d{yyyy-MM-dd}.%i.log 43 | 100MB 44 | 30 45 | 3GB 46 | 47 | 48 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 49 | 50 | 51 | 52 | 53 | 54 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /tb-transports/http/conf/tb-http-transport.conf: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2021 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | export JAVA_OPTS="$JAVA_OPTS -Xlog:gc*,heap*,age*,safepoint=debug:file=/var/log/tb-http-transport/${TB_SERVICE_ID}-gc.log:time,uptime,level,tags:filecount=10,filesize=10M" 33 | export JAVA_OPTS="$JAVA_OPTS -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/tb-http-transport/${TB_SERVICE_ID}-heapdump.bin" 34 | export JAVA_OPTS="$JAVA_OPTS -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark" 35 | export JAVA_OPTS="$JAVA_OPTS -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:MaxTenuringThreshold=10" 36 | export JAVA_OPTS="$JAVA_OPTS -XX:+ExitOnOutOfMemoryError" 37 | export LOG_FILENAME=tb-http-transport.out 38 | export LOADER_PATH=/usr/share/tb-http-transport/conf 39 | -------------------------------------------------------------------------------- /tb-transports/lwm2m/conf/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 34 | 35 | 36 | 37 | 39 | /var/log/tb-lwm2m-transport/${TB_SERVICE_ID}/tb-lwm2m-transport.log 40 | 42 | /var/log/tb-lwm2m-transport/${TB_SERVICE_ID}/tb-lwm2m-transport.%d{yyyy-MM-dd}.%i.log 43 | 100MB 44 | 30 45 | 3GB 46 | 47 | 48 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 49 | 50 | 51 | 52 | 53 | 54 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /tb-transports/lwm2m/conf/tb-lwm2m-transport.conf: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2021 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | export JAVA_OPTS="$JAVA_OPTS -Xlog:gc*,heap*,age*,safepoint=debug:file=/var/log/tb-lwm2m-transport/${TB_SERVICE_ID}-gc.log:time,uptime,level,tags:filecount=10,filesize=10M" 33 | export JAVA_OPTS="$JAVA_OPTS -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/tb-lwm2m-transport/${TB_SERVICE_ID}-heapdump.bin" 34 | export JAVA_OPTS="$JAVA_OPTS -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark" 35 | export JAVA_OPTS="$JAVA_OPTS -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:MaxTenuringThreshold=10" 36 | export JAVA_OPTS="$JAVA_OPTS -XX:+ExitOnOutOfMemoryError" 37 | export LOG_FILENAME=tb-lwm2m-transport.out 38 | export LOADER_PATH=/usr/share/tb-lwm2m-transport/conf 39 | -------------------------------------------------------------------------------- /tb-transports/mqtt/conf/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 34 | 35 | 36 | 37 | 39 | /var/log/tb-mqtt-transport/${TB_SERVICE_ID}/tb-mqtt-transport.log 40 | 42 | /var/log/tb-mqtt-transport/${TB_SERVICE_ID}/tb-mqtt-transport.%d{yyyy-MM-dd}.%i.log 43 | 100MB 44 | 30 45 | 3GB 46 | 47 | 48 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 49 | 50 | 51 | 52 | 53 | 54 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /tb-transports/mqtt/conf/tb-mqtt-transport.conf: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2021 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | export JAVA_OPTS="$JAVA_OPTS -Xlog:gc*,heap*,age*,safepoint=debug:file=/var/log/tb-mqtt-transport/${TB_SERVICE_ID}-gc.log:time,uptime,level,tags:filecount=10,filesize=10M" 33 | export JAVA_OPTS="$JAVA_OPTS -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/tb-mqtt-transport/${TB_SERVICE_ID}-heapdump.bin" 34 | export JAVA_OPTS="$JAVA_OPTS -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark" 35 | export JAVA_OPTS="$JAVA_OPTS -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:MaxTenuringThreshold=10" 36 | export JAVA_OPTS="$JAVA_OPTS -XX:+ExitOnOutOfMemoryError" 37 | export LOG_FILENAME=tb-mqtt-transport.out 38 | export LOADER_PATH=/usr/share/tb-mqtt-transport/conf 39 | -------------------------------------------------------------------------------- /tb-transports/snmp/conf/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 34 | 35 | 36 | 37 | 39 | /var/log/tb-snmp-transport/${TB_SERVICE_ID}/tb-snmp-transport.log 40 | 42 | /var/log/tb-snmp-transport/${TB_SERVICE_ID}/tb-snmp-transport.%d{yyyy-MM-dd}.%i.log 43 | 100MB 44 | 30 45 | 3GB 46 | 47 | 48 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 49 | 50 | 51 | 52 | 53 | 54 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /tb-transports/snmp/conf/tb-snmp-transport.conf: -------------------------------------------------------------------------------- 1 | # 2 | # ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL 3 | # 4 | # Copyright © 2016-2021 ThingsBoard, Inc. All Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains 7 | # the property of ThingsBoard, Inc. and its suppliers, 8 | # if any. The intellectual and technical concepts contained 9 | # herein are proprietary to ThingsBoard, Inc. 10 | # and its suppliers and may be covered by U.S. and Foreign Patents, 11 | # patents in process, and are protected by trade secret or copyright law. 12 | # 13 | # Dissemination of this information or reproduction of this material is strictly forbidden 14 | # unless prior written permission is obtained from COMPANY. 15 | # 16 | # Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, 17 | # managers or contractors who have executed Confidentiality and Non-disclosure agreements 18 | # explicitly covering such access. 19 | # 20 | # The copyright notice above does not evidence any actual or intended publication 21 | # or disclosure of this source code, which includes 22 | # information that is confidential and/or proprietary, and is a trade secret, of COMPANY. 23 | # ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, 24 | # OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT 25 | # THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, 26 | # AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. 27 | # THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION 28 | # DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, 29 | # OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. 30 | # 31 | 32 | export JAVA_OPTS="$JAVA_OPTS -Xlog:gc*,heap*,age*,safepoint=debug:file=/var/log/tb-snmp-transport/${TB_SERVICE_ID}-gc.log:time,uptime,level,tags:filecount=10,filesize=10M" 33 | export JAVA_OPTS="$JAVA_OPTS -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/tb-snmp-transport/${TB_SERVICE_ID}-heapdump.bin" 34 | export JAVA_OPTS="$JAVA_OPTS -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark" 35 | export JAVA_OPTS="$JAVA_OPTS -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:MaxTenuringThreshold=10" 36 | export JAVA_OPTS="$JAVA_OPTS -XX:+ExitOnOutOfMemoryError" 37 | export LOG_FILENAME=tb-snmp-transport.out 38 | export LOADER_PATH=/usr/share/tb-snmp-transport/conf 39 | -------------------------------------------------------------------------------- /tb-vc-executor.env: -------------------------------------------------------------------------------- 1 | ZOOKEEPER_ENABLED=true 2 | ZOOKEEPER_URL=zookeeper:2181 3 | -------------------------------------------------------------------------------- /tb-vc-executor/conf/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 24 | /var/log/tb-vc-executor/${TB_SERVICE_ID}/tb-vc-executor.log 25 | 27 | /var/log/tb-vc-executor/${TB_SERVICE_ID}/tb-vc-executor.%d{yyyy-MM-dd}.%i.log 28 | 100MB 29 | 30 30 | 3GB 31 | 32 | 33 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 34 | 35 | 36 | 37 | 38 | 39 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /tb-vc-executor/conf/tb-vc-executor.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright © 2016-2022 The Thingsboard Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | export JAVA_OPTS="$JAVA_OPTS -Xlog:gc*,heap*,age*,safepoint=debug:file=/var/log/tb-vc-executor/${TB_SERVICE_ID}-gc.log:time,uptime,level,tags:filecount=10,filesize=10M" 18 | export JAVA_OPTS="$JAVA_OPTS -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/tb-vc-executor/${TB_SERVICE_ID}-heapdump.bin" 19 | export JAVA_OPTS="$JAVA_OPTS -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark" 20 | export JAVA_OPTS="$JAVA_OPTS -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:MaxTenuringThreshold=10" 21 | export JAVA_OPTS="$JAVA_OPTS -XX:+ExitOnOutOfMemoryError" 22 | export LOG_FILENAME=tb-vc-executor.out 23 | export LOADER_PATH=/usr/share/tb-vc-executor/conf 24 | -------------------------------------------------------------------------------- /tb-web-report.env: -------------------------------------------------------------------------------- 1 | 2 | HTTP_BIND_ADDRESS=0.0.0.0 3 | HTTP_BIND_PORT=8383 4 | LOGGER_LEVEL=info 5 | LOG_FOLDER=logs 6 | LOGGER_FILENAME=tb-web-report-%DATE%.log 7 | DOCKER_MODE=true 8 | 9 | DEFAULT_PAGE_NAVIGATION_TIMEOUT=120000 10 | DASHBOARD_IDLE_WAIT_TIME=3000 11 | USE_NEW_PAGE_FOR_REPORT=true 12 | -------------------------------------------------------------------------------- /tb-web-ui.env: -------------------------------------------------------------------------------- 1 | 2 | HTTP_BIND_ADDRESS=0.0.0.0 3 | HTTP_BIND_PORT=8080 4 | TB_ENABLE_PROXY=false 5 | LOGGER_LEVEL=info 6 | LOG_FOLDER=logs 7 | LOGGER_FILENAME=tb-web-ui-%DATE%.log 8 | DOCKER_MODE=true --------------------------------------------------------------------------------