-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
77 lines (76 loc) · 1.66 KB
/
docker-compose.yml
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
---
version: '3'
services:
rks-consul:
image: "consul:1.6.1"
ports:
- "8500:8500"
command: consul agent -dev -client 0.0.0.0 -log-level=info
environment:
- CONSUL_BIND_INTERFACE=eth0
networks:
- rks-internal
rks-vault:
image: "vault:1.3.1"
cap_add:
- IPC_LOCK
command: vault server -config=/etc/vault/vault_server.hcl -log-level=info
ports:
- "8200:8200"
environment:
- VAULT_ADDR=http://127.0.0.1:8200
volumes:
- ./scripts/vault_server.hcl:/etc/vault/vault_server.hcl
networks:
- rks-internal
rks-server:
build:
context: .
command: --vaultaddr http://rks-vault:8200 --adminLogin admin-rks --adminPwd 12345
ports:
- "8080:8080"
networks:
- rks-internal
- rks-external
demo-init:
build:
context: .
dockerfile: ./scripts/Dockerfile
depends_on:
- "rks-consul"
- "rks-vault"
- "rks-server"
command: wait-for rks-vault:8200 -- /bin/demo_init.sh
volumes:
- ./demo/:/demo/
networks:
- rks-internal
- rks-external
client-node-1:
build:
context: ./client-nodes/go/
command: --group-token-file ./demo/group_token --node-id 1
ports:
- "8443:8443"
volumes:
- ./demo:/demo
networks:
- client
- rks-external
restart: on-failure
client-node-2:
build:
context: ./client-nodes/go/
command: --group-token-file ./demo/group_token --node-id 2
ports:
- "8444:8443"
volumes:
- ./demo:/demo
networks:
- client
- rks-external
restart: on-failure
networks:
rks-internal:
rks-external:
client: