blob: f00148492aba9263a1bb2b6aa16ac7bff36756da [file]
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
services:
iotdb:
image: apache/iotdb:2.0.8-standalone
container_name: iotdb-table-test
environment:
IOTDB_USERNAME: ${IOTDB_USERNAME:?set IOTDB_USERNAME}
IOTDB_PASSWORD: ${IOTDB_PASSWORD:?set IOTDB_PASSWORD}
ports:
- "${IOTDB_RPC_PORT:-6667}:6667"
networks:
- tb-iotdb-test
healthcheck:
test: ["CMD-SHELL", "bash -ec ': >/dev/tcp/127.0.0.1/6667'"]
interval: 10s
timeout: 5s
retries: 12
start_period: 30s
postgres:
image: postgres:15
container_name: tb-postgres-test
environment:
POSTGRES_DB: ${TB_POSTGRES_DB:-thingsboard}
POSTGRES_USER: ${TB_POSTGRES_USER:?set TB_POSTGRES_USER}
POSTGRES_PASSWORD: ${TB_POSTGRES_PASSWORD:?set TB_POSTGRES_PASSWORD}
ports:
- "${TB_POSTGRES_PORT:-5432}:5432"
networks:
- tb-iotdb-test
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U \"$${POSTGRES_USER}\" -d \"$${POSTGRES_DB}\"",
]
interval: 10s
timeout: 5s
retries: 12
start_period: 10s
thingsboard:
image: thingsboard/tb-node:4.3.1.2
container_name: thingsboard-table-test
depends_on:
iotdb:
condition: service_healthy
postgres:
condition: service_healthy
environment:
TB_QUEUE_TYPE: ${TB_QUEUE_TYPE:-in-memory}
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/${TB_POSTGRES_DB:-thingsboard}
SPRING_DATASOURCE_USERNAME: ${TB_POSTGRES_USER:?set TB_POSTGRES_USER}
SPRING_DATASOURCE_PASSWORD: ${TB_POSTGRES_PASSWORD:?set TB_POSTGRES_PASSWORD}
DATABASE_TS_TYPE: ${DATABASE_TS_TYPE:-sql}
DATABASE_TS_LATEST_TYPE: ${DATABASE_TS_LATEST_TYPE:-sql}
IOTDB_HOST: ${IOTDB_HOST:-iotdb}
IOTDB_PORT: ${IOTDB_PORT:-6667}
IOTDB_USERNAME: ${IOTDB_USERNAME:?set IOTDB_USERNAME}
IOTDB_PASSWORD: ${IOTDB_PASSWORD:?set IOTDB_PASSWORD}
INSTALL_TB: ${INSTALL_TB:-true}
LOAD_DEMO: ${LOAD_DEMO:-false}
ports:
- "${TB_HTTP_PORT:-8080}:8080"
networks:
- tb-iotdb-test
healthcheck:
test: ["CMD-SHELL", "bash -ec ': >/dev/tcp/127.0.0.1/8080'"]
interval: 15s
timeout: 5s
retries: 20
start_period: 90s
networks:
tb-iotdb-test:
driver: bridge