Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-microservice-exam
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
汪想
spring-microservice-exam
Commits
cbc88dcb
Commit
cbc88dcb
authored
May 25, 2020
by
wangx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs
parent
8907173a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
55 deletions
+45
-55
docker-compose-base.yml
docs/deploy/docker-compose-base.yml
+25
-27
docker-compose-services.yml
docs/deploy/docker-compose-services.yml
+6
-6
docker-compose.env
docs/deploy/docker-compose.env
+12
-12
start.sh
docs/deploy/start.sh
+2
-10
No files found.
docs/deploy/docker-compose-base.yml
View file @
cbc88dcb
...
...
@@ -42,34 +42,34 @@ services:
# ---------------------------
# rabbitMq
# ---------------------------
rabbit
:
image
:
rabbitmq:3.6.6-management-alpine
container_name
:
rabbit-mq
restart
:
always
ports
:
-
"
5672
:5672"
-
"
15672
:15672"
environment
:
-
RABBITMQ_DEFAULT_USER=guest
-
RABBITMQ_DEFAULT_PASS=guest
networks
:
-
net
#
rabbit:
#
image: rabbitmq:3.6.6-management-alpine
#
container_name: rabbit-mq
#
restart: always
#
ports:
# - "9603
:5672"
#- "9601
:15672"
#
environment:
#
- RABBITMQ_DEFAULT_USER=guest
#
- RABBITMQ_DEFAULT_PASS=guest
#
networks:
#
- net
# ---------------------------
# Redis
# ---------------------------
redis
:
image
:
redis:latest
container_name
:
redis
restart
:
always
command
:
redis-server /usr/local/etc/redis/redis.conf
ports
:
-
"
6379:6379"
volumes
:
-
./redis-data:/data
-
./redis.conf:/usr/local/etc/redis/redis.conf
networks
:
-
net
#
redis:
#
image: redis:latest
#
container_name: redis
#
restart: always
#
command: redis-server /usr/local/etc/redis/redis.conf
#
ports:
# - "2
6379:6379"
#
volumes:
#
- ./redis-data:/data
#
- ./redis.conf:/usr/local/etc/redis/redis.conf
#
networks:
#
- net
# ---------------------------
# zipkin
...
...
@@ -87,14 +87,12 @@ services:
# 配置中心
# ---------------------------
config-service
:
image
:
registry.cn-
hangzhou.aliyuncs.com/spring-microservice-exam
/config-service:latest
image
:
registry.cn-
beijing.aliyuncs.com/spring-microservice-exame
/config-service:latest
container_name
:
config-service
env_file
:
docker-compose.env
# 从文件中获取配置
restart
:
always
depends_on
:
-
consul
-
rabbit
-
redis
ports
:
-
"
9181:9181"
volumes
:
...
...
docs/deploy/docker-compose-services.yml
View file @
cbc88dcb
...
...
@@ -4,7 +4,7 @@ services:
# api网关
# ---------------------------
gateway-service
:
image
:
registry.cn-
hangzhou.aliyuncs.com/spring-microservice-exam
/gateway-service:latest
image
:
registry.cn-
beijing.aliyuncs.com/spring-microservice-exame
/gateway-service:latest
container_name
:
gateway-service
env_file
:
docker-compose.env
# 从文件中获取配置
restart
:
always
...
...
@@ -19,7 +19,7 @@ services:
# 授权服务
# ---------------------------
auth-service
:
image
:
registry.cn-
hangzhou.aliyuncs.com/spring-microservice-exam
/auth-service:latest
image
:
registry.cn-
beijing.aliyuncs.com/spring-microservice-exame
/auth-service:latest
container_name
:
auth-service
env_file
:
docker-compose.env
# 从文件中获取配置
restart
:
always
...
...
@@ -34,7 +34,7 @@ services:
# 用户服务
# ---------------------------
user-service
:
image
:
registry.cn-
hangzhou.aliyuncs.com/spring-microservice-exam
/user-service:latest
image
:
registry.cn-
beijing.aliyuncs.com/spring-microservice-exame
/user-service:latest
container_name
:
user-service
env_file
:
docker-compose.env
# 从文件中获取配置
restart
:
always
...
...
@@ -50,7 +50,7 @@ services:
# 考试服务
# ---------------------------
exam-service
:
image
:
registry.cn-
hangzhou.aliyuncs.com/spring-microservice-exam
/exam-service:latest
image
:
registry.cn-
beijing.aliyuncs.com/spring-microservice-exame
/exam-service:latest
container_name
:
exam-service
env_file
:
docker-compose.env
# 从文件中获取配置
restart
:
always
...
...
@@ -65,7 +65,7 @@ services:
# 消息服务
# ---------------------------
msc-service
:
image
:
registry.cn-
hangzhou.aliyuncs.com/spring-microservice-exam
/msc-service:latest
image
:
registry.cn-
beijing.aliyuncs.com/spring-microservice-exame
/msc-service:latest
container_name
:
msc-service
env_file
:
docker-compose.env
# 从文件中获取配置
restart
:
always
...
...
@@ -80,7 +80,7 @@ services:
# 监控服务
# ---------------------------
monitor-service
:
image
:
registry.cn-
hangzhou.aliyuncs.com/spring-microservice-exam
/monitor-service:latest
image
:
registry.cn-
beijing.aliyuncs.com/spring-microservice-exame
/monitor-service:latest
container_name
:
monitor-service
env_file
:
docker-compose.env
# 从文件中获取配置
restart
:
always
...
...
docs/deploy/docker-compose.env
View file @
cbc88dcb
...
...
@@ -13,27 +13,27 @@ GATEWAY_SECRET=test
SPRING_PROFILES_ACTIVE=native
# consul配置
CONSUL_HOST=
consul
CONSUL_HOST=
123.56.187.202
CONSUL_PORT=8500
# rabbitMq配置
RABBIT_HOST=
rabbit
RABBIT_PORT=
5672
RABBITMQ_DEFAULT_USER=
guest
RABBITMQ_DEFAULT_PASS=
guest
RABBIT_HOST=
123.56.187.202
RABBIT_PORT=
9063
RABBITMQ_DEFAULT_USER=
rabbitmq
RABBITMQ_DEFAULT_PASS=
abcd-1234
# Redis配置
REDIS_HOST=
redis
REDIS_PORT=6379
REDIS_HOST=
123.56.187.202
REDIS_PORT=
2
6379
# 数据库配置
MYSQL_HOST=
mysql
MYSQL_PORT=3306
MYSQL_USERNAME=
root
MYSQL_PASSWORD=
11
MYSQL_HOST=
123.56.187.202
MYSQL_PORT=
2
3306
MYSQL_USERNAME=
lcrxyf
MYSQL_PASSWORD=
Abcd-0066
# FDFS配置
FDFS_HOST=
fdfs
FDFS_HOST=
123.56.187.202
FDFS_PORT=22122
# 七牛云配置
...
...
docs/deploy/start.sh
View file @
cbc88dcb
#!/bin/sh
# 配置文件根目录,固定是spring-microservice-exam
DOCKERHOME
=
/spring-microservice-exam
DOCKERHOME
=
/
home/lcrxyf/
spring-microservice-exam
# 镜像名称前缀、标签
BASE_IMAGE_NAME
=
registry.cn-
hangzhou.aliyuncs.com/spring-microservice-exam
BASE_IMAGE_NAME
=
registry.cn-
beijing.aliyuncs.com/spring-microservice-exame
BSEE_IMAGE_TAG
=
latest
# 各服务的镜像名称
...
...
@@ -66,9 +66,6 @@ case "$1" in
time
docker pull
$GATEWAY_SERVICE
time
docker pull
$MSC_SERVICE
time
docker pull
$MONITOR_SERVICE
echo
"* 开始拉取前端镜像..."
time
docker pull
$UI_SERVICE
time
docker pull
$WEB_SERVICE
echo
"* 拉取镜像成功..."
echo
"* 开始运行基础镜像..."
...
...
@@ -77,11 +74,6 @@ case "$1" in
sleep
10
echo
"* 开始运行后端服务镜像..."
time
docker-compose
-f
$DOCKERHOME
/docker-compose-services.yml up
-d
echo
"* 等待10s..."
sleep
10
echo
"* 开始运行前端服务镜像..."
time
docker-compose
-f
$DOCKERHOME
/docker-compose-nginx.yml up
-d
echo
"* 运行成功..."
;;
# 停止容器
stop
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment