-
Notifications
You must be signed in to change notification settings - Fork 261
/
docker-compose.yaml
109 lines (102 loc) · 2.46 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
version: "3"
networks:
network:
ipam:
driver: default
config:
- subnet: '177.8.0.0/16'
services:
mysql:
build:
context: ./
dockerfile: ./Dockerfile-mysql
container_name: slg-mysql
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci #设置utf8字符集
restart: always
ports:
- "3306:3306"
volumes:
- ./mysql_data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=123456abc
- MYSQL_USER=slg
- MYSQL_PASSWORD=123456abc
networks:
network:
ipv4_address: 177.8.0.11
chat:
build:
context: ./
dockerfile: ./Dockerfile-chat
container_name: slg-chat
restart: always
ports:
- '8002:8002'
volumes:
- ./data:/go/src/github.com/llr104/slgserver/data
- ./logs:/go/src/github.com/llr104/slgserver/logs
networks:
network:
ipv4_address: 177.8.0.12
gate:
build:
context: ./
dockerfile: ./Dockerfile-gate
container_name: slg-gate
restart: always
ports:
- '8004:8004'
volumes:
- ./data:/go/src/github.com/llr104/slgserver/data
- ./logs:/go/src/github.com/llr104/slgserver/logs
networks:
network:
ipv4_address: 177.8.0.13
http:
build:
context: ./
dockerfile: ./Dockerfile-http
container_name: slg-http
restart: always
ports:
- '8088:8088'
volumes:
- ./data:/go/src/github.com/llr104/slgserver/data
- ./logs:/go/src/github.com/llr104/slgserver/logs
depends_on:
- mysql
networks:
network:
ipv4_address: 177.8.0.14
login:
build:
context: ./
dockerfile: ./Dockerfile-login
container_name: slg-login
restart: always
ports:
- '8003:8003'
volumes:
- ./data:/go/src/github.com/llr104/slgserver/data
- ./logs:/go/src/github.com/llr104/slgserver/logs
depends_on:
- mysql
networks:
network:
ipv4_address: 177.8.0.15
slg:
build:
context: ./
dockerfile: ./Dockerfile-slg
container_name: slg-slg
restart: always
ports:
- '8001:8001'
volumes:
- ./data:/go/src/github.com/llr104/slgserver/data
- ./logs:/go/src/github.com/llr104/slgserver/logs
depends_on:
- mysql
networks:
network:
ipv4_address: 177.8.0.16