diff --git a/docker/deploy.sh b/docker/deploy.sh index 69b529a4..7fc79fdc 100644 --- a/docker/deploy.sh +++ b/docker/deploy.sh @@ -29,12 +29,12 @@ base(){ #启动程序模块 start(){ - docker-compose up -d ruoyi-admin + docker-compose up -d ruoyi-server1 ruoyi-server2 } #停止程序模块 stop(){ - docker-compose stop ruoyi-admin + docker-compose stop ruoyi-server1 ruoyi-server2 } #关闭所有模块 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 93c18f4d..4a720b6d 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -75,19 +75,32 @@ services: ruoyi_net: ipv4_address: 172.30.0.48 - ruoyi-admin: - image: "ruoyi/ruoyi-admin:2.4.0" + ruoyi-server1: + image: "ruoyi/ruoyi-server:2.4.0" environment: - TZ=Asia/Shanghai volumes: # 配置文件 - - /docker/server/logs/:/ruoyi/server/logs/ + - /docker/server1/logs/:/ruoyi/server/logs/ privileged: true restart: always networks: ruoyi_net: ipv4_address: 172.30.0.60 + ruoyi-server2: + image: "ruoyi/ruoyi-server:2.4.0" + environment: + - TZ=Asia/Shanghai + volumes: + # 配置文件 + - /docker/server2/logs/:/ruoyi/server/logs/ + privileged: true + restart: always + networks: + ruoyi_net: + ipv4_address: 172.30.0.61 + networks: ruoyi_net: driver: bridge