Commit cbc88dcb by wangx

docs

parent 8907173a
...@@ -42,34 +42,34 @@ services: ...@@ -42,34 +42,34 @@ services:
# --------------------------- # ---------------------------
# rabbitMq # rabbitMq
# --------------------------- # ---------------------------
rabbit: #rabbit:
image: rabbitmq:3.6.6-management-alpine # image: rabbitmq:3.6.6-management-alpine
container_name: rabbit-mq #container_name: rabbit-mq
restart: always #restart: always
ports: #ports:
- "5672:5672" # - "9603:5672"
- "15672:15672" #- "9601:15672"
environment: #environment:
- RABBITMQ_DEFAULT_USER=guest # - RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest # - RABBITMQ_DEFAULT_PASS=guest
networks: #networks:
- net # - net
# --------------------------- # ---------------------------
# Redis # Redis
# --------------------------- # ---------------------------
redis: #redis:
image: redis:latest # image: redis:latest
container_name: redis #container_name: redis
restart: always #restart: always
command: redis-server /usr/local/etc/redis/redis.conf #command: redis-server /usr/local/etc/redis/redis.conf
ports: #ports:
- "6379:6379" # - "26379:6379"
volumes: #volumes:
- ./redis-data:/data #- ./redis-data:/data
- ./redis.conf:/usr/local/etc/redis/redis.conf #- ./redis.conf:/usr/local/etc/redis/redis.conf
networks: #networks:
- net # - net
# --------------------------- # ---------------------------
# zipkin # zipkin
...@@ -87,14 +87,12 @@ services: ...@@ -87,14 +87,12 @@ services:
# 配置中心 # 配置中心
# --------------------------- # ---------------------------
config-service: 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 container_name: config-service
env_file: docker-compose.env # 从文件中获取配置 env_file: docker-compose.env # 从文件中获取配置
restart: always restart: always
depends_on: depends_on:
- consul - consul
- rabbit
- redis
ports: ports:
- "9181:9181" - "9181:9181"
volumes: volumes:
......
...@@ -4,7 +4,7 @@ services: ...@@ -4,7 +4,7 @@ services:
# api网关 # api网关
# --------------------------- # ---------------------------
gateway-service: 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 container_name: gateway-service
env_file: docker-compose.env # 从文件中获取配置 env_file: docker-compose.env # 从文件中获取配置
restart: always restart: always
...@@ -19,7 +19,7 @@ services: ...@@ -19,7 +19,7 @@ services:
# 授权服务 # 授权服务
# --------------------------- # ---------------------------
auth-service: 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 container_name: auth-service
env_file: docker-compose.env # 从文件中获取配置 env_file: docker-compose.env # 从文件中获取配置
restart: always restart: always
...@@ -34,7 +34,7 @@ services: ...@@ -34,7 +34,7 @@ services:
# 用户服务 # 用户服务
# --------------------------- # ---------------------------
user-service: 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 container_name: user-service
env_file: docker-compose.env # 从文件中获取配置 env_file: docker-compose.env # 从文件中获取配置
restart: always restart: always
...@@ -50,7 +50,7 @@ services: ...@@ -50,7 +50,7 @@ services:
# 考试服务 # 考试服务
# --------------------------- # ---------------------------
exam-service: 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 container_name: exam-service
env_file: docker-compose.env # 从文件中获取配置 env_file: docker-compose.env # 从文件中获取配置
restart: always restart: always
...@@ -65,7 +65,7 @@ services: ...@@ -65,7 +65,7 @@ services:
# 消息服务 # 消息服务
# --------------------------- # ---------------------------
msc-service: 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 container_name: msc-service
env_file: docker-compose.env # 从文件中获取配置 env_file: docker-compose.env # 从文件中获取配置
restart: always restart: always
...@@ -80,7 +80,7 @@ services: ...@@ -80,7 +80,7 @@ services:
# 监控服务 # 监控服务
# --------------------------- # ---------------------------
monitor-service: 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 container_name: monitor-service
env_file: docker-compose.env # 从文件中获取配置 env_file: docker-compose.env # 从文件中获取配置
restart: always restart: always
......
...@@ -13,27 +13,27 @@ GATEWAY_SECRET=test ...@@ -13,27 +13,27 @@ GATEWAY_SECRET=test
SPRING_PROFILES_ACTIVE=native SPRING_PROFILES_ACTIVE=native
# consul配置 # consul配置
CONSUL_HOST=consul CONSUL_HOST=123.56.187.202
CONSUL_PORT=8500 CONSUL_PORT=8500
# rabbitMq配置 # rabbitMq配置
RABBIT_HOST=rabbit RABBIT_HOST=123.56.187.202
RABBIT_PORT=5672 RABBIT_PORT=9063
RABBITMQ_DEFAULT_USER=guest RABBITMQ_DEFAULT_USER=rabbitmq
RABBITMQ_DEFAULT_PASS=guest RABBITMQ_DEFAULT_PASS=abcd-1234
# Redis配置 # Redis配置
REDIS_HOST=redis REDIS_HOST=123.56.187.202
REDIS_PORT=6379 REDIS_PORT=26379
# 数据库配置 # 数据库配置
MYSQL_HOST=mysql MYSQL_HOST=123.56.187.202
MYSQL_PORT=3306 MYSQL_PORT=23306
MYSQL_USERNAME=root MYSQL_USERNAME=lcrxyf
MYSQL_PASSWORD=11 MYSQL_PASSWORD=Abcd-0066
# FDFS配置 # FDFS配置
FDFS_HOST=fdfs FDFS_HOST=123.56.187.202
FDFS_PORT=22122 FDFS_PORT=22122
# 七牛云配置 # 七牛云配置
......
#!/bin/sh #!/bin/sh
# 配置文件根目录,固定是spring-microservice-exam # 配置文件根目录,固定是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 BSEE_IMAGE_TAG=latest
# 各服务的镜像名称 # 各服务的镜像名称
...@@ -66,9 +66,6 @@ case "$1" in ...@@ -66,9 +66,6 @@ case "$1" in
time docker pull $GATEWAY_SERVICE time docker pull $GATEWAY_SERVICE
time docker pull $MSC_SERVICE time docker pull $MSC_SERVICE
time docker pull $MONITOR_SERVICE time docker pull $MONITOR_SERVICE
echo "* 开始拉取前端镜像..."
time docker pull $UI_SERVICE
time docker pull $WEB_SERVICE
echo "* 拉取镜像成功..." echo "* 拉取镜像成功..."
echo "* 开始运行基础镜像..." echo "* 开始运行基础镜像..."
...@@ -77,11 +74,6 @@ case "$1" in ...@@ -77,11 +74,6 @@ case "$1" in
sleep 10 sleep 10
echo "* 开始运行后端服务镜像..." echo "* 开始运行后端服务镜像..."
time docker-compose -f $DOCKERHOME/docker-compose-services.yml up -d 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) stop)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment