-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathdocker-compose.yml
61 lines (58 loc) · 1.34 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
version: "3.3"
services:
mysql:
image: mysql:5.7.42
container_name: mysql-5.7.42
restart: always
volumes:
- mysql_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: 8GfCHJbnPCiAquNP
MYSQL_DATABASE: mblog
MYSQL_USER: mblog
MYSQL_PASSWORD: FeZ3DVjdFMAdzJmu
command: [
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_general_ci',
'--max_connections=3000',
'--explicit_defaults_for_timestamp=ON'
]
expose:
- 3306
networks:
- backend
mblog-backend:
image: kingwrcy/mblog-backend
container_name: mblog-backend
restart: always
volumes:
- mblog-backend-data:/opt/mblog/upload
environment:
MYSQL_USER: mblog
MYSQL_PASS: FeZ3DVjdFMAdzJmu
MYSQL_URL: mysql:3306
MYSQL_DB: mblog
MBLOG_FRONT_DOMAIN: 这里改成你的前端域名,带http(s)和端口(有的话)
depends_on:
- mysql
links:
- mysql
ports:
- "38321:38321"
networks:
- backend
mblog-front:
image: kingwrcy/mblog-front
container_name: mblog-front
restart: always
environment:
MBLOG_SERVER_URL: 这里改成你的服务端域名,带http(s)和端口(有的话)
ports:
- "80:80"
networks:
- backend
volumes:
mysql_data:
mblog-backend-data:
networks:
backend: