forked from PelionIoT/devicedb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
66 lines (66 loc) · 1.58 KB
/
docker-compose.yaml
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
# This defines a minimal setup to simulate a devicedb edge node connected
# to a devicedb cloud node
version: '3'
services:
devicedb-identity:
build: .
command: generate-certs-and-identity.sh /etc/devicedb
environment:
- CLOUD_HOST=devicedb-cloud
- CLOUD_URI=ws://devicedb-cloud:8080/sync
- EDGE_DATA_DIRECTORY=/var/lib/devicedb/data
- EDGE_LISTEN_PORT=9090
- EDGE_LOG_LEVEL=info
- EDGE_CLIENT_CERT=./client.crt
- EDGE_CLIENT_KEY=./client.key
- EDGE_CLIENT_CA=./myCA.pem
- EDGE_CLIENT_RESOURCES=/etc/devicedb/shared
volumes:
- devicedb-identity:/etc/devicedb
- ${EDGE_CLIENT_RESOURCES}:/etc/devicedb/shared
devicedb-edge:
build: .
command:
- devicedb
- start
- -conf
- /etc/devicedb/devicedb.conf
depends_on:
- devicedb-identity
ports:
- "9090:9090"
volumes:
- devicedb-identity:/etc/devicedb
- devicedb-edge-data:/var/lib/devicedb
devicedb-cloud:
build: .
command:
- devicedb
- cluster
- start
- -store
- /var/lib/devicedb/data
- -snapshot_store
- /var/lib/devicedb/snapshots
- -replication_factor
- "1"
- -host
- "0.0.0.0"
depends_on:
- devicedb-identity
ports:
- "8080:8080"
volumes:
- devicedb-identity:/etc/devicedb
- devicedb-cloud-data:/var/lib/devicedb
devicedb-cloud-init:
build: .
command: compose-cloud-add-device.sh /etc/devicedb
depends_on:
- devicedb-identity
volumes:
- devicedb-identity:/etc/devicedb
volumes:
devicedb-identity:
devicedb-cloud-data:
devicedb-edge-data: