代码拉取完成,页面将自动刷新
同步操作将从 vickze/vickze-cloud-admin 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# docker network create vickze-cloud-admin
# 启动nacos、mysql、redis在同一个网络vickze-cloud-admin
# ./mvnw install -DskipTests
# mkdir -p vickze-gateway/target/example && (cd vickze-gateway/target/example; jar -xf ../*.jar)
# mkdir -p vickze-auth/vickze-auth-server/target/example && (cd vickze-auth/vickze-auth-server/target/example; jar -xf ../*.jar)
# mkdir -p vickze-generator/target/example && (cd vickze-generator/target/example; jar -xf ../*.jar)
# mkdir -p vickze-sso/target/example && (cd vickze-sso/target/example; jar -xf ../*.jar)
#
# (cd ../vickze-auth-ui/; yarn install; yarn cross-env SSO=http://192.168.56.105:92/ umi build)
# (cd ../vickze-generator-ui/; yarn install; yarn cross-env SSO=http://192.168.56.105:92/ umi build)
# (cd ../vickze-sso-ui/; yarn install; yarn build)
#
# docker-compose -f docker-compose-sso.yml build
# docker-compose -f docker-compose-sso.yml up
version: '3'
networks:
default:
external:
name: vickze-cloud-admin
services:
# nacos:
# image: nacos/nacos-server:latest
# container_name: nacos-standalone
# environment:
# - PREFER_HOST_MODE=hostname
# - MODE=standalone
# volumes:
# - nacos-data:/home/nacos
# - ./example/nacos/custom.properties:/home/nacos/init.d/custom.properties
# - /etc/localtime:/etc/localtime
# ports:
# - "8848:8848"
#
# # prometheus、grafana 内存不足可以选择关闭
# prometheus:
# container_name: prometheus
# image: prom/prometheus:latest
# volumes:
# - prometheus-data:/prometheus
# - ./example/prometheus/prometheus-standalone.yaml:/etc/prometheus/prometheus.yml
# - /etc/localtime:/etc/localtime
# ports:
# - "9090:9090"
# depends_on:
# - nacos
# restart: on-failure
#
# grafana:
# container_name: grafana
# image: grafana/grafana:latest
# volumes:
# - grafana-data:/var/lib/grafana
# - /etc/localtime:/etc/localtime
# ports:
# - 3000:3000
# restart: on-failure
#
# mysql:
# image: mysql # mysql8可能需要修改密码认证机制 docker exec -it mysql bash; mysql -u root -p; ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
# container_name: mysql
# environment:
# - MYSQL_ROOT_PASSWORD=123456
# volumes:
# - mysql-data:/var/lib/mysql
# - /etc/localtime:/etc/localtime
# ports:
# - "3306:3306"
# redis:
# image: redis
# container_name: redis
# volumes:
# - redis-data:/data
# - /etc/localtime:/etc/localtime
# ports:
# - "6379:6379"
vickze-gateway:
image: io.vickze/vickze-gateway
build: ./vickze-gateway/
container_name: vickze-gateway
volumes:
- application-log:/log #Docker卷挂载日志目录,挂载宿主机其他目录注意存在Docker容器没有执行权限问题,参考https://www.linuxidc.com/Linux/2015-03/115124.htm解决
- /etc/localtime:/etc/localtime #解决Docker容器时间与宿主机不一致问题
ports:
- "16000:16000"
environment:
- NACOS_ADDR=nacos-standalone:8848
- JAVA_OPTS=-Xmx128m -Duser.timezone=GMT+8 #-Duser.timezone=GMT+8解决打印日志小8小时问题
- COMMAND_ARGS=--REDIS_HOST=redis
# # 设置labels
# labels:
# type: springboot
# name: vickze-gateway
# # logging设置增加labels.service
# logging:
# driver: json-file #Docker持久化日志跟springboot输出日志到文件两者可以2选1
# options:
# labels: "type,name"
# max-size: "10m"
# max-file: "10"
vickze-auth:
image: io.vickze/vickze-auth
build: ./vickze-auth/vickze-auth-server/
container_name: vickze-auth #domain name含有[_]字符时访问tomcat会报400,使用docker-compose自动生成的容器名含有[_],使用容器名访问服务接口会有问题
volumes:
- application-log:/log
- /etc/localtime:/etc/localtime
environment:
- NACOS_ADDR=nacos-standalone:8848
- JAVA_OPTS=-Xmx128m -DMYSQL_HOST=mysql -Duser.timezone=GMT+8
- COMMAND_ARGS=--REDIS_HOST=redis
# # 设置labels
# labels:
# type: springboot
# name: vickze-auth
# # logging设置增加labels.service
# logging:
# driver: json-file
# options:
# labels: "type,name"
# max-size: "10m"
# max-file: "10"
vickze-generator:
image: io.vickze/vickze-generator
build: ./vickze-generator/
container_name: vickze-generator
volumes:
- application-log:/log
- /etc/localtime:/etc/localtime
environment:
- NACOS_ADDR=nacos-standalone:8848
- JAVA_OPTS=-Xmx128m -DMASTER_MYSQL_HOST=mysql -Duser.timezone=GMT+8
- COMMAND_ARGS=--GENERATOR_MYSQL_HOST=mysql
# # 设置labels
# labels:
# type: springboot
# name: vickze-generator
# # logging设置增加labels.service
# logging:
# driver: json-file
# options:
# labels: "type,name"
# max-size: "10m"
# max-file: "10"
vickze-sso:
image: io.vickze/vickze-sso
build: ./vickze-sso/
volumes:
- application-log:/log
- /etc/localtime:/etc/localtime
container_name: vickze-sso
environment:
- NACOS_ADDR=nacos-standalone:8848
- JAVA_OPTS=-Xmx128m -Duser.timezone=GMT+8
# # 设置labels
# labels:
# type: springboot
# name: vickze-sso
# # logging设置增加labels.service
# logging:
# driver: json-file
# options:
# labels: "type,name"
# max-size: "10m"
# max-file: "10"
vickze-auth-ui:
image: io.vickze/vickze-auth-ui
volumes:
- /etc/localtime:/etc/localtime
build:
context: ../vickze-auth-ui
dockerfile: Dockerfile.hub
container_name: vickze-auth-ui
ports:
- "90:80"
# 设置labels
labels:
type: nginx
name: vickze-auth-ui
# logging设置增加labels.service
logging:
driver: json-file # nginx Docker容器默认只输出日志到控制台,官方镜像将/var/log/nginx/access.log链接到/dev/stdout
options:
labels: "type,name"
max-size: "10m"
max-file: "10"
depends_on:
- vickze-gateway
vickze-generator-ui:
image: io.vickze/vickze-generator-ui
volumes:
- /etc/localtime:/etc/localtime
build:
context: ../vickze-generator-ui
dockerfile: Dockerfile.hub
container_name: vickze-generator-ui
ports:
- "91:80"
# 设置labels
labels:
type: nginx
name: vickze-generator-ui
# logging设置增加labels.service
logging:
driver: json-file
options:
labels: "type,name"
max-size: "10m"
max-file: "10"
depends_on:
- vickze-gateway
vickze-sso-ui:
image: io.vickze/vickze-sso-ui
volumes:
- /etc/localtime:/etc/localtime
build:
context: ../vickze-sso-ui
dockerfile: Dockerfile.hub
container_name: vickze-sso-ui
ports:
- "92:80"
# 设置labels
labels:
type: nginx
name: vickze-generator-ui
# logging设置增加labels.service
logging:
driver: json-file
options:
labels: "type,name"
max-size: "10m"
max-file: "10"
depends_on:
- vickze-gateway
volumes:
# nacos-data: {}
# prometheus-data: {}
# grafana-data: {}
# mysql-data: {}
# redis-data: {}
application-log: {}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。