-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yaml
135 lines (135 loc) · 2.41 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
version: '3'
services:
redis:
image: redis
ports:
- "20020:6379"
expose:
- 6379
container_name: "go-redis"
networks:
- dev
elasticsearch:
image: elasticsearch:7.3.1
environment:
discovery.type: "single-node"
ports:
- "20021:9200"
expose:
- 9200
container_name: "go-elasticsearch"
networks:
- dev
mysql:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: "123456"
MYSQL_USER: 'root'
MYSQL_PASS: '123456'
ports:
- "20022:3306"
expose:
- 3306
container_name: "go-mysql"
networks:
- dev
mongo:
image: mongo
ports:
- "20023:27017"
expose:
- 27017
container_name: "go-mongo"
networks:
- dev
# golang 服务
manager:
image: golang
tty: true
container_name: "go-manager"
build: ./
ports:
- "22223:22223"
working_dir: /golang-project/
command:
- /bin/bash
- -c
- |
make manager
./manager
links:
- redis
- elasticsearch
- mongo
- mysql
networks:
- dev
depends_on:
- elasticsearch
- redis
- mongo
- mysql
volumes:
- .:/golang-project
# - $HOME/medivh/go:/go # 这里可在自己开发时指定本地go目录
admin:
image: golang
tty: true
container_name: "go-admin"
build: ./
ports:
- "22224:22224"
working_dir: /golang-project/
command:
- /bin/bash
- -c
- |
make admin
./admin
links:
- redis
- elasticsearch
- mongo
- mysql
networks:
- dev
depends_on:
- elasticsearch
- redis
- mongo
- mysql
volumes:
- .:/golang-project
# - $HOME/medivh/go:/go # 这里可在自己开发时指定本地go目录
services:
image: golang
tty: true
container_name: "go-services"
build: ./
ports:
- "22222:22222"
working_dir: /golang-project/
command:
- /bin/bash
- -c
- |
make services
./services
links:
- redis
- elasticsearch
- mongo
- mysql
networks:
- dev
depends_on:
- elasticsearch
- redis
- mongo
- mysql
volumes:
- .:/golang-project
# - $HOME/medivh/go:/go # 这里可在自己开发时指定本地go目录
networks:
dev:
driver: bridge