-
Notifications
You must be signed in to change notification settings - Fork 245
/
docker-compose.yml
65 lines (62 loc) · 1.38 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
version: '3'
services:
web:
build: .
restart: always
container_name: w5_web
platform: "linux/amd64"
ports:
- "8888:8888"
depends_on:
- mysql
- redis
environment:
MYSQL_HOST: "mysql"
MYSQL_PORT: 3306
MYSQL_DATABASE: "w5_db"
MYSQL_USER: "root"
MYSQL_PASSWORD: "w5_12345678"
REDIS_HOST: "redis"
REDIS_PORT: 6379
REDIS_DATABASE: 0
REDIS_PASSWORD: ""
volumes:
- ./docker/config.ini:/w5/config.ini
- ./docker/apps:/w5/apps
- ./docker/logs:/opt
- /etc/localtime:/etc/localtime
networks:
- w5Net
mysql:
image: mysql
restart: always
container_name: w5_mysql
ports:
- "3307:3306"
volumes:
- ./docker/sql:/docker-entrypoint-initdb.d
- ./docker/conf.d:/etc/mysql/conf.d
- ./docker/mysql_db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: "w5_12345678"
TZ: Asia/Shanghai
command:
--max_connections=1000
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--default-authentication-plugin=mysql_native_password
networks:
- w5Net
redis:
image: redis:alpine
restart: always
container_name: w5_redis
environment:
REDIS_PASSWORD: ""
volumes:
- ./docker/redis_db:/data
networks:
- w5Net
networks:
w5Net:
driver: bridge