-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·98 lines (93 loc) · 2.16 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
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
version: '3'
services:
dice-openresty:
container_name: dice-openresty
build:
context: ./
dockerfile: ./dice-docker/dice-openresty/openresty-Dockerfile
environment:
TZ: Asia/Shanghai
ports:
- "80:80"
- "443:443"
volumes:
- ~/.dice/logs/openresty:/usr/local/openresty/nginx/logs
depends_on:
- dice-server
- dice-front
networks:
dice-net:
ipv4_address: 172.28.1.1
dice-mysql:
container_name: dice-mysql
build:
context: ./
dockerfile: ./dice-docker/dice-mysql/dice-mysql-Dockerfile
environment:
MYSQL_DATABASE: dice
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_HOST: '%'
TZ: Asia/Shanghai
expose:
- "3306"
volumes:
- ~/.dice/mysql/mysql_data:/var/lib/mysql
restart: always
networks:
dice-net:
ipv4_address: 172.28.1.2
dice-server:
container_name: dice-server
build:
context: ./
dockerfile: ./dice-docker/dice-server-Dockerfile
working_dir: /app
environment:
TZ: Asia/Shanghai
volumes:
- ./dice-server:/app
- ~/.m2:/root/.m2
- ~/.dice/logs/server:/app/log
- ~/.dice/upload:/root/.dice/upload
expose:
- "9091"
command: mvn clean spring-boot:run -Dspring-boot.run.profiles=docker -Dmaven.test.skip=true
depends_on:
- dice-mysql
- dice-redis
restart: always
networks:
dice-net:
ipv4_address: 172.28.1.3
dice-redis:
container_name: dice-redis
build:
context: ./
dockerfile: ./dice-docker/dice-redis-Dockerfile
environment:
TZ: Asia/Shanghai
restart: always
networks:
dice-net:
ipv4_address: 172.28.1.4
dice-front:
container_name: dice-front
build:
context: ./
dockerfile: ./dice-docker/dice-front/dice-front-Dockerfile
environment:
TZ: Asia/Shanghai
entrypoint: /app/entrypoint.sh -d dice-server:9091 -c 'npm run start';
expose:
- "3000"
depends_on:
- dice-server
networks:
dice-net:
ipv4_address: 172.28.1.6
networks:
dice-net:
ipam:
driver: default
config:
- subnet: 172.28.0.0/16