-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
138 lines (132 loc) · 3.24 KB
/
docker-compose.yml
File metadata and controls
138 lines (132 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
services:
postgres:
restart: always
image: "postgres:16.8"
ports:
- "5432:5432"
environment:
POSTGRES_DB: thingsboard
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d thingsboard"]
interval: 10s
timeout: 5s
retries: 5
redis:
restart: always
image: "redis:7"
ports:
- "6379:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
cassandra:
restart: always
image: "cassandra:4.1.3"
ports:
- "9042:9042"
environment:
CASSANDRA_CLUSTER_NAME: "Thingsboard Cluster"
CASSANDRA_NUM_TOKENS: 256
HEAP_NEWSIZE: 128M
MAX_HEAP_SIZE: 512M
volumes:
- cassandra-data:/var/lib/cassandra
healthcheck:
test: ["CMD-SHELL", "cqlsh -e 'DESCRIBE KEYSPACES' || exit 1"]
interval: 15s
timeout: 10s
retries: 10
start_period: 30s
tb-node:
restart: always
image: "thingsboard/tb-node:3.4.3"
ports:
- "8080:8080"
- "7070:7070"
- "1883:1883"
- "8883:8883"
# not used for development env
# - "5683-5688:5683-5688/udp"
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
environment:
TB_SERVICE_ID: tb-ce-node
TB_SERVICE_TYPE: "monolith"
# PostgreSQL
SPRING_JPA_DATABASE_PLATFORM: org.hibernate.dialect.PostgreSQLDialect
SPRING_DRIVER_CLASS_NAME: org.postgresql.Driver
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/thingsboard
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres
# Cache
CACHE_TYPE: redis
REDIS_HOST: redis
# Queue
TB_QUEUE_TYPE: in-memory
# Cassandra
DATABASE_TS_TYPE: cassandra
CASSANDRA_URL: cassandra:9042
CASSANDRA_LOCAL_DATACENTER: datacenter1
volumes:
- ./tb-node/conf:/config
- ./tb-node/log:/var/log/thingsboard
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
cassandra:
condition: service_healthy
pgadmin:
image: dpage/pgadmin4:latest
restart: always
ports:
- "5050:80"
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: admin
volumes:
- pgadmin-data:/var/lib/pgadmin
depends_on:
postgres:
condition: service_healthy
redisinsight:
image: redis/redisinsight:latest
restart: always
ports:
- "5540:5540"
volumes:
- redisinsight-data:/data
depends_on:
redis:
condition: service_healthy
cassweb:
image: ipushc/cassandra-web:latest
restart: always
ports:
- "8081:8083" # Access GUI at http://localhost:8081
environment:
CASSWEB_HOST: "0.0.0.0"
CASSWEB_PORT: 8083
CASSWEB_CASSANDRA_HOST: cassandra
CASSWEB_CASSANDRA_PORT: 9042
depends_on:
cassandra:
condition: service_healthy
volumes:
postgres-data:
redis-data:
cassandra-data:
pgadmin-data:
redisinsight-data: