-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
99 lines (91 loc) · 2.04 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
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
version: '3.7'
networks:
feilu-base-net:
driver: bridge
ipam:
config:
- subnet: 10.10.10.0/24
gateway: 10.10.10.1
services:
etcd:
image: quay.io/coreos/etcd:v3.3.12
container_name: etcd-v3
ports:
- 2379:2379
- 2380:2380
networks:
feilu-base-net:
ipv4_address: 10.10.10.2
environment:
ETCDCTL_API: 3
# volumes:
# - /Users/owenliu/lehui/data/etcd/etcd-data:/etcd-data
command:
- "/usr/local/bin/etcd"
- "--name"
- "s1"
- "--data-dir"
- "/etcd-data"
- "--advertise-client-urls"
- "http://0.0.0.0:2379"
- --listen-client-urls
- "http://0.0.0.0:2379"
- "--initial-advertise-peer-urls"
- "http://0.0.0.0:2380"
- "--listen-peer-urls"
- "http://0.0.0.0:2380"
- "--initial-cluster-token"
- "tkn"
- "--initial-cluster"
- "s1=http://0.0.0.0:2380"
- "--initial-cluster-state"
- "new"
v-template-01:
image: v-template-01
container_name: v-template-01
restart: always
ports:
- "8081:8081"
command:
/go/src/v-template-01/server
networks:
feilu-base-net:
ipv4_address: 10.10.10.11
# - ipv4_address:172.18.0.10
v-template-02:
image: v-template-02
container_name: v-template-02
restart: always
ports:
- "8082:8082"
command:
/go/src/v-template-02/server
networks:
feilu-base-net:
ipv4_address: 10.10.10.12
v-template-03:
image: v-template-03
container_name: v-template-03
restart: always
ports:
- "8083:8083"
command:
/go/src/v-template-03/server
networks:
feilu-base-net:
ipv4_address: 10.10.10.13
v-template-etcd:
image: v-template-etcd
container_name: v-template-etcd
restart: always
ports:
- "8888:8888"
command:
/go/src/v-template-etcd/server
networks:
feilu-base-net:
ipv4_address: 10.10.10.10
# environment:
# ETCD_HOST: etcd
# links:
# - etcd:etcd