-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
84 lines (84 loc) · 2.17 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
78
79
80
81
82
83
84
version: '2.0'
services:
golang:
container_name: golang
image: "m9rco/go:1.10.8-dev"
ports:
- "2222:22"
- "80:80"
- "1234:1234"
volumes:
- $GOPATH:/app:rw
environment:
- GOPATH=/app
depends_on:
- etcd_01
- etcd_02
- mongodb
networks:
exile_network:
ipv4_address: 172.16.238.2
etcd_01:
container_name: etcd_01
image: "m9rco/etcd:3.3.13"
ports:
- "2379"
- "2380"
ulimits:
nproc: 65535
environment:
- ALLOW_NONE_AUTHENTICATION=yes
- ETCD_NAME=etcd_01
- ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd_01:2380
- ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
- ETCD_ADVERTISE_CLIENT_URLS=http://etcd_01:2379
- ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster
- ETCD_INITIAL_CLUSTER=etcd_01=http://etcd_01:2380,etcd_02=http://etcd_02:2380
- ETCD_INITIAL_CLUSTER_STATE=new
extra_hosts:
- "etcd_01:172.16.238.3"
- "etcd_02:172.16.238.4"
networks:
exile_network:
ipv4_address: 172.16.238.3
etcd_02:
container_name: etcd_02
image: "m9rco/etcd:3.3.13"
ports:
- "2379"
- "2380"
ulimits:
nproc: 65535
environment:
- ALLOW_NONE_AUTHENTICATION=yes
- ETCD_NAME=etcd_02
- ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd_02:2380
- ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
- ETCD_ADVERTISE_CLIENT_URLS=http://etcd_01:2379
- ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster
- ETCD_INITIAL_CLUSTER=etcd_01=http://etcd_01:2380,etcd_02=http://etcd_02:2380
- ETCD_INITIAL_CLUSTER_STATE=new
extra_hosts:
- "etcd_01:172.16.238.3"
- "etcd_02:172.16.238.4"
networks:
exile_network:
ipv4_address: 172.16.238.4
mongodb:
container_name: mongodb
image: "m9rco/mongodb:3.6.7"
ports:
- "27017:27017"
networks:
exile_network:
ipv4_address: 172.16.238.5
networks:
exile_network:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.238.0/24
gateway: 172.16.238.1