From 0e39f6fa2d67de9d956f3e043f68b7bd7a030db2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Fri, 2 Sep 2022 17:55:02 +0800 Subject: [PATCH] =?UTF-8?q?remove=20=E7=A7=BB=E9=99=A4=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=20=E4=BD=BF=E7=94=A8idea=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=9B=BF=E4=BB=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/docker/deploy.sh | 109 ---------------------------------------- 1 file changed, 109 deletions(-) delete mode 100644 script/docker/deploy.sh diff --git a/script/docker/deploy.sh b/script/docker/deploy.sh deleted file mode 100644 index 8c756f34..00000000 --- a/script/docker/deploy.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/bash - -#使用说明,用来提示输入参数 -usage() { - echo "Usage: sh 执行脚本.sh [port|mount|monitor|base|start|stop|stopall|rm|rmiNoneTag]" - exit 1 -} - -#开启所需端口(生产环境不推荐开启) -port(){ - # mysql 端口 - firewall-cmd --add-port=3306/tcp --permanent - # redis 端口 - firewall-cmd --add-port=6379/tcp --permanent - # minio api 端口 - firewall-cmd --add-port=9000/tcp --permanent - # minio 控制台端口 - firewall-cmd --add-port=9001/tcp --permanent - # 监控中心端口 - firewall-cmd --add-port=9090/tcp --permanent - # 任务调度中心端口 - firewall-cmd --add-port=9100/tcp --permanent - # 重启防火墙 - service firewalld restart -} - -##放置挂载文件 -mount(){ - #挂载 nginx 配置文件 - if test ! -f "/docker/nginx/" ;then - mkdir -p /docker/nginx/ - cp -r nginx/* /docker/nginx/ - fi - #挂载 redis 配置文件 - if test ! -f "/docker/redis/" ;then - mkdir -p /docker/redis/ - cp -r redis/* /docker/redis/ - fi - chmod -R 777 /docker -} - -#启动基础模块 -base(){ - docker-compose up -d mysql nginx-web redis minio -} - -#启动监控模块 -monitor(){ - docker-compose up -d ruoyi-monitor-admin -} - -#启动程序模块 -start(){ - docker-compose up -d ruoyi-xxl-job-admin ruoyi-server1 ruoyi-server2 -} - -#停止程序模块 -stop(){ - docker-compose stop ruoyi-xxl-job-admin ruoyi-server1 ruoyi-server2 -} - -#关闭所有模块 -stopall(){ - docker-compose stop -} - -#删除所有模块 -rm(){ - docker-compose rm -} - -#删除Tag为空的镜像 -rmiNoneTag(){ - docker images|grep none|awk '{print $3}'|xargs docker rmi -f -} - -#根据输入参数,选择执行对应方法,不输入则执行使用说明 -case "$1" in -"port") - port -;; -"mount") - mount -;; -"base") - base -;; -"monitor") - monitor -;; -"start") - start -;; -"stop") - stop -;; -"stopall") - stopall -;; -"rm") - rm -;; -"rmiNoneTag") - rmiNoneTag -;; -*) - usage -;; -esac