-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (67 loc) · 1.75 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
66
67
68
69
# 构建docker-compose项目
# docker compose --log-level INFO up -- build
# docker compose --log-level INFO up -d --build
version: "3.8"
services:
jvue-nginx:
image: jvue/nginx:1.15.9
container_name: jvue-nginx
build:
context: ./
dockerfile: ./jvue-nginx/Dockerfile
ports:
- "80:80"
volumes:
- ./jvue-nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./data/nginx/log:/var/log/nginx
restart: "no"
jvue-mysql:
image: jvue/mysql:5.7.24
container_name: jvue-mysql
build:
context: ./
dockerfile: ./jvue-mysql/Dockerfile
ports:
- "3308:3306"
environment:
# 最好使用此设定时区,其它静像也可以使用,也可以用"TZ=Asia/Shanghai"
- "TZ=CST-8"
- "MYSQL_ROOT_PASSWORD=123456"
- "MYSQL_ROOT_HOST=%"
- "MYSQL_DATABASE=bugucms4"
- "MYSQL_USER=terwer"
- "MYSQL_PASSWORD=123456"
volumes:
- ./data/mysql/db:/var/db
- ./data/mysql/log:/var/log
- ./jvue-mysql/my.cnf:/etc/my.cnf
- ./jvue-mysql/init:/docker-entrypoint-initdb.d/
restart: "no"
jvue-server:
depends_on:
- jvue-mysql
image: jvue/server:4.0.1
container_name: jvue-server
build:
context: ./
dockerfile: ./jvue-server/Dockerfile
ports:
- "8008:8008"
working_dir: /app
command: mvn clean spring-boot:run -Dspring-boot.run.profiles=docker -DskipTests
volumes:
- ./jvue-server:/app
- ./data/maven/.m2:/root/.m2
- ./data/server/logs:/logs
restart: "no"
jvue-front:
depends_on:
- jvue-server
container_name: jvue-front
image: jvue/front:4.0.1
build:
context: .
dockerfile: ./jvue-front/Dockerfile
ports:
- "3000:3000"
restart: "no"