-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
57 lines (51 loc) · 1.5 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
version: '3.8'
services:
consul-server:
image: hashicorp/consul:1.15
container_name: consul-server
volumes:
- ./test/server.json:/consul/config/server.json:ro
networks:
- consul
ports:
- "8500:8500"
- "8600:8600/tcp"
- "8600:8600/udp"
command: "agent -bootstrap-expect=1"
consul-client-a:
image: hashicorp/consul:1.15
container_name: consul-client-a
networks:
- consul
command: "agent -node=client-a -join=consul-server -encrypt aPuGh+5UDskRAbkLaXRzFoSOcSM+5vAK+NEYOWHJH7w="
depends_on:
- consul-server
consul-client-b:
image: hashicorp/consul:1.15
container_name: consul-client-b
networks:
- consul
ports:
- "8501:8500"
command: "agent -node=client-b -client=0.0.0.0 -join=consul-server -encrypt aPuGh+5UDskRAbkLaXRzFoSOcSM+5vAK+NEYOWHJH7w="
depends_on:
- consul-server
cts:
image: hashicorp/consul-terraform-sync:0.7
container_name: cts
volumes:
- ./test/cts-config.hcl:/consul-terraform-sync/config/cts-config.hcl:rw
- ./main.tf:/dnsimple-consul/main.tf:ro
- ./variables.tf:/dnsimple-consul/variables.tf:ro
- ./modules:/dnsimple-consul/modules:ro
- ./test/terraform.tfvars:/consul-terraform-sync/config/terraform.tfvars:ro
networks:
- consul
ports:
- "8558:8558"
command: "consul-terraform-sync start --config-dir /consul-terraform-sync/config"
depends_on:
- consul-server
networks:
consul:
driver: bridge