-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
95 lines (89 loc) · 2.21 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
version: "3.4"
services:
mysql:
container_name: ssadmin-mysql
image: mysql:8
restart: unless-stopped
tty: true
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE:-root}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-123456}
volumes:
- mysql:/var/lib/mysql/
- ./sql/ssadmin_init.sql:/docker-entrypoint-initdb.d/ssadmin_init.sql:ro
redis:
container_name: ssadmin-redis
image: redis:7.0.12
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis:/data
- ./redis.conf:/user/local/etc/redis/redis.conf
# 数据导入
- ./dump.rdb:/data/dump.rdb
command: ["redis-server", "/user/local/etc/redis/redis.conf"]
rabbitmq:
restart: unless-stopped
image: rabbitmq:3.9-management
container_name: ssadmin-rabbitmq
hostname: ssadmin-rabbitmq
ports:
- 5672:5672
- 15672:15672
environment:
TZ: Asia/Shanghai
RABBITMQ_DEFAULT_USER: root
RABBITMQ_DEFAULT_PASS: root
volumes:
- rabbitmq:/var/lib/rabbitmq
command: >
bash -c "
rabbitmq-plugins enable rabbitmq_management &&
rabbitmq-server
"
server:
container_name: ssadmin-server
build:
context: ./rbac_back/
image: ssadmin-server
restart: unless-stopped
ports:
- "28080:28080"
environment:
SPRING_PROFILES_ACTIVE: server
JAVA_OPTS:
${JAVA_OPTS:-
-Xms512m
-Xmx512m
-Djava.security.egd=file:/dev/./urandom
}
ARGS:
--spring.datasource.url=${DATASOURCE_URL:-jdbc:mysql://ssadmin-mysql:3306/ssadmin?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&useAffectedRows=true}
depends_on:
- mysql
- redis
- rabbitmq
web:
container_name: ssadmin-web
build:
context: ./rbac
args:
NODE_ENV:
ENV=${NODE_ENV:-production}
VUE_APP_TITLE=${VUE_APP_TITLE:-SSADMIN管理系统}
image: ssadmin-web
restart: unless-stopped
ports:
- "80:80"
depends_on:
- server
volumes:
mysql:
driver: local
redis:
driver: local
rabbitmq:
driver: local