forked from f1soft/gf-vue-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
63 lines (60 loc) · 1.47 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
version: "3.8"
networks:
network:
ipam:
driver: default
config:
- subnet: '177.7.0.0/16'
services:
web:
build:
context: ./
dockerfile: ./dockerfile_web
container_name: gf-vue-admin-web
restart: always
ports:
- '8080:8080'
depends_on:
- server
command: [ 'nginx-debug', '-g', 'daemon off;' ]
networks:
network:
ipv4_address: 177.7.0.11
server:
build:
context: ./
dockerfile: ./dockerfile_server
container_name: gf-vue-admin-server
restart: always
ports:
- '8888:8888'
depends_on:
- mysql
- redis
networks:
network:
ipv4_address: 177.7.0.12
mysql:
image: mysql:8.0.21
container_name: gf-vue-admin-mysql
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci #设置utf8字符集
restart: always
ports:
- "13306:3306" # host物理直接映射端口为13306
environment:
MYSQL_DATABASE: 'gf-vue-admin' # 初始化启动时要创建的数据库的名称
MYSQL_ROOT_PASSWORD: "gdkid,,.." # root管理员用户密码
volumes:
- '.docker-compose/docker-entrypoint-initdb.d/init.sql:/docker-entrypoint-initdb.d/init.sql'
networks:
network:
ipv4_address: 177.7.0.13
redis:
image: redis:6.0.6
container_name: gf-vue-admin-redis
restart: always
ports:
- '6379:6379'
networks:
network:
ipv4_address: 177.7.0.14