1 Star 0 Fork 49

秋枫渔影/online-exam

forked from GuYiTan/online-exam 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
docker-compose.yml 7.14 KB
一键复制 编辑 原始数据 按行查看 历史
GuYiTan 提交于 2019-02-28 09:13 . 优化
version: '2'
services:
# online-exam-web
online-exam-web:
image: registry.cn-hangzhou.aliyuncs.com/online-exam/online-exam-web:0.1.0
volumes:
# 挂载nginx的配置文件
- ./deploy/nginx/conf/nginx.conf:/etc/nginx/nginx.conf
container_name: online-exam-web
ports:
- 80:80
restart: always
# online-exam-ui
online-exam-ui:
image: registry.cn-hangzhou.aliyuncs.com/online-exam/online-exam-ui:0.1.0
volumes:
# 挂载nginx的配置文件
- ./deploy/nginx/conf/nginx.conf:/etc/nginx/nginx.conf
container_name: online-exam-ui
ports:
- 81:80
restart: always
# MySQL
online-exam-mysql:
image: mysql:5.7
volumes:
- data:/var/lib/mysql
# 自动执行初始化脚本
- ./deploy/mysql:/docker-entrypoint-initdb.d/
environment:
MYSQL_ROOT_PASSWORD: 11 # root账户的密码
restart: always
container_name: online-exam-mysql
ports:
- 3306:3306
# redis
online-exam-redis:
image: redis:5.0
ports:
- 6379:6379
restart: always
container_name: online-exam-redis
hostname: online-exam-redis
# rabbitMq
online-exam-rabbit-mq:
image: rabbitmq:management-alpine
container_name: rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=admin
restart: always
ports:
- "5672:5672"
- "15672:15672"
# fastDfs-tracker
online-exam-fdfs-tracker:
image: morunchang/fastdfs
ports:
- 22122:22122
entrypoint: sh tracker.sh
hostname: online-exam-fdfs-tracker
# fastDfs-storage
online-exam-fdfs-storage:
build: ./deploy/fastDFS/storage
ports:
- 8088:8080
- 23000:23000
depends_on:
- online-exam-fdfs-tracker
volumes:
- ./deploy/fastDFS/data:/data/fast_data
environment:
GROUP_NAME: group1
TRACKER_IP: online-exam-fdfs-tracker:22122
LOG_LEVEL: debug
image: registry.cn-hangzhou.aliyuncs.com/online-exam/online-exam-fdfs-storage:0.1.0
hostname: online-exam-fdfs-storage
# 注册中心
online-exam-eureka:
restart: always
ports:
- 8765:8765
environment:
- SPRING_PROFILES_ACTIVE=test
container_name: online-exam-eureka
hostname: online-exam-eureka
image: registry.cn-hangzhou.aliyuncs.com/online-exam/online-exam-eureka:0.1.0
# 配置中心
online-exam-config:
restart: always
ports:
- 8888:8888
depends_on:
- online-exam-eureka
links:
- online-exam-eureka:online-exam-eureka
environment:
- SPRING_PROFILES_ACTIVE=test
- EUREKA_HOST=online-exam-eureka
- EUREKA_PORT=8765
container_name: online-exam-config
hostname: online-exam-config
image: registry.cn-hangzhou.aliyuncs.com/online-exam/online-exam-config:0.1.0
# 权限服务
online-exam-auth:
restart: always
ports:
- 3000:3000
depends_on:
- online-exam-eureka
- online-exam-config
- online-exam-rabbit-mq
links:
- online-exam-eureka:online-exam-eureka
- online-exam-config:online-exam-config
environment:
- SPRING_PROFILES_ACTIVE=test
- EUREKA_HOST=online-exam-eureka
- EUREKA_PORT=8765
- CONFIG_HOST=online-exam-config
- CONFIG_PORT=8888
- ZIPKIN_HOST=
- ZIPKIN_PORT=
- REDIS_HOST=online-exam-redis
- REDIS_PORT=6379
- MYSQL_HOST=online-exam-mysql
- MYSQL_PORT=3306
- RABBIT_MQ_HOST=online-exam-rabbit-mq
- RABBIT_MQ_PORT=5672
- RABBIT_MQ_USERNAME=admin
- RABBIT_MQ_PASSWORD=admin
# entrypoint: sh /wait-for-it.sh online-exam-config:8888 -t 600 --
# command: java -Djava.security.egd=file:/dev/./urandom -jar online-exam-auth.jar
container_name: online-exam-auth
hostname: online-exam-auth
image: registry.cn-hangzhou.aliyuncs.com/online-exam/online-exam-auth:0.1.0
# 网关
online-exam-gateway:
restart: always
ports:
- 9999:9999
environment:
# 环境变量配置
- SPRING_PROFILES_ACTIVE=test
- EUREKA_HOST=online-exam-eureka
- EUREKA_PORT=8765
- CONFIG_HOST=online-exam-config
- CONFIG_PORT=8888
- AUTH_HOST=online-exam-auth
- AUTH_PORT=3000
- ZIPKIN_HOST=
- ZIPKIN_PORT=
- REDIS_HOST=online-exam-redis
- REDIS_PORT=6379
- MYSQL_HOST=online-exam-mysql
- MYSQL_PORT=3306
- RABBIT_MQ_HOST=online-exam-rabbit-mq
- RABBIT_MQ_PORT=5672
- RABBIT_MQ_USERNAME=admin
- RABBIT_MQ_PASSWORD=admin
# 启动顺序
# entrypoint: sh /wait-for-it.sh online-exam-auth:3000 -t 600 --
# command: java -Djava.security.egd=file:/dev/./urandom -jar online-exam-gateway.jar
container_name: online-exam-gateway
hostname: online-exam-gateway
image: registry.cn-hangzhou.aliyuncs.com/online-exam/online-exam-gateway:0.1.0
# 用户服务
online-exam-user:
restart: always
ports:
- 4000:4000
environment:
# 环境变量配置
- SPRING_PROFILES_ACTIVE=test
- EUREKA_HOST=online-exam-eureka
- EUREKA_PORT=8765
- CONFIG_HOST=online-exam-config
- CONFIG_PORT=8888
- AUTH_HOST=online-exam-auth
- AUTH_PORT=3000
- ZIPKIN_HOST=
- ZIPKIN_PORT=
- REDIS_HOST=online-exam-redis
- REDIS_PORT=6379
- MYSQL_HOST=online-exam-mysql
- MYSQL_PORT=3306
- RABBIT_MQ_HOST=online-exam-rabbit-mq
- RABBIT_MQ_PORT=5672
- RABBIT_MQ_USERNAME=admin
- RABBIT_MQ_PASSWORD=admin
- FDFS_HOST=online-exam-fdfs-tracker
- FDFS_PORT=22122
- ATTACHMENT_HOST=http://b.yourdomain.cn:8088
- ATTACHMENT_PORT=80
container_name: online-exam-user
hostname: online-exam-user
image: registry.cn-hangzhou.aliyuncs.com/online-exam/online-exam-user:0.1.0
# 考试服务
online-exam-exam:
restart: always
ports:
- 35010:35010
environment:
# 环境变量配置
- SPRING_PROFILES_ACTIVE=test
- EUREKA_HOST=online-exam-eureka
- EUREKA_PORT=8765
- CONFIG_HOST=online-exam-config
- CONFIG_PORT=8888
- AUTH_HOST=online-exam-auth
- AUTH_PORT=3000
- ZIPKIN_HOST=
- ZIPKIN_PORT=
- REDIS_HOST=online-exam-redis
- REDIS_PORT=6379
- MYSQL_HOST=online-exam-mysql
- MYSQL_PORT=3306
- RABBIT_MQ_HOST=online-exam-rabbit-mq
- RABBIT_MQ_PORT=5672
- RABBIT_MQ_USERNAME=admin
- RABBIT_MQ_PASSWORD=admin
container_name: online-exam-exam
hostname: online-exam-exam
image: registry.cn-hangzhou.aliyuncs.com/online-exam/online-exam-exam:0.1.0
# zipkin服务
online-exam-zipkin:
restart: always
ports:
- 9411:9411
environment:
- SPRING_PROFILES_ACTIVE=test
- EUREKA_HOST=online-exam-eureka
- EUREKA_PORT=8765
- CONFIG_HOST=online-exam-config
- CONFIG_PORT=8888
- REDIS_HOST=online-exam-redis
- REDIS_PORT=6379
- RABBIT_MQ_HOST=online-exam-rabbit-mq
- RABBIT_MQ_PORT=5672
- RABBIT_MQ_USERNAME=admin
- RABBIT_MQ_PASSWORD=admin
container_name: online-exam-zipkin
hostname: online-exam-zipkin
image: registry.cn-hangzhou.aliyuncs.com/online-exam/online-exam-zipkin:0.1.0
volumes:
data:
driver: local
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/zl_sun_admin/online-exam.git
git@gitee.com:zl_sun_admin/online-exam.git
zl_sun_admin
online-exam
online-exam
master

搜索帮助