version: '3.7' # 应用服务 services: # Nacos服务 xiaomayi-nacoss: # 镜像 image: 192.168.10.102:8001/xiaomayi/xiaomayi-nacoss:${VERSION:-latest} # 容器名 container_name: xiaomayi-nacoss # 重启方式 restart: always # 网络模式 network_mode: host # 端口映射 ports: - 8848:8848 - 9848:9848 - 9849:9849 environment: - MYSQL_DB=xiaomayi.nacos - MYSQL_PORT=3311 - MYSQL_HOST=192.168.10.101 - MYSQL_USER=root - MYSQL_PWD=LlWx1qaz2wsx3edc#$^ volumes: - /etc/hosts:/etc/hosts:ro # 发布 deploy: resources: limits: cpus: '2' memory: 1.5G reservations: cpus: '0.25' memory: 500M # 网关服务 xiaomayi-gateway: # 镜像 image: 192.168.10.102:8001/xiaomayi/xiaomayi-gateway:${VERSION:-latest} # 容器名 container_name: xiaomayi-gateway # 重启方式 restart: always # 网络模式 network_mode: host # 端口映射 ports: - 9010:9010 volumes: - /etc/hosts:/etc/hosts:ro # 发布 deploy: resources: limits: cpus: '2' memory: 1.5G reservations: cpus: '0.25' memory: 500M # 认证服务 xiaomayi-auth: # 镜像 image: 192.168.10.102:8001/xiaomayi/xiaomayi-auth:${VERSION:-latest} # 容器名 container_name: xiaomayi-auth # 重启方式 restart: always # 网络模式 network_mode: host # 端口映射 ports: - 9020:9020 volumes: - /etc/hosts:/etc/hosts:ro # 发布 deploy: resources: limits: cpus: '2' memory: 1.5G reservations: cpus: '0.25' memory: 500M # Seata服务 xiaomayi-seatas: # 镜像 image: 192.168.10.102:8001/xiaomayi/xiaomayi-seatas:${VERSION:-latest} # 容器名 container_name: xiaomayi-seatas # 重启方式 restart: always # 网络模式 network_mode: host # 端口映射 ports: - 7091:7091 - 8091:8091 volumes: - /etc/hosts:/etc/hosts:ro environment: - SEATA_IP=192.168.10.113 - SEATA_PORT=8091 - STORE_MODE=file - SEATA_CONFIG_NAME=file:/opt/apps/conf/registry.conf # 发布 deploy: resources: limits: cpus: '2' memory: 1.5G reservations: cpus: '0.25' memory: 500M # 监控服务 xiaomayi-monitor: # 镜像 image: 192.168.10.102:8001/xiaomayi/xiaomayi-monitor:${VERSION:-latest} # 容器名 container_name: xiaomayi-monitor # 重启方式 restart: always # 网络模式 network_mode: host # 端口映射 ports: - 9000:9000 volumes: - /etc/hosts:/etc/hosts:ro # 发布 deploy: resources: limits: cpus: '2' memory: 1.5G reservations: cpus: '0.25' memory: 500M # 后端应用服务 xiaomayi-admin-biz: # 镜像 image: 192.168.10.102:8001/xiaomayi/xiaomayi-admin-biz:${VERSION:-latest} # 容器名 container_name: xiaomayi-admin-biz # 重启方式 restart: always # 网络模式 network_mode: host # 端口映射 ports: - 9030:9030 volumes: - /etc/hosts:/etc/hosts:ro - $PWD/upload:/opt/apps/upload # 发布 deploy: resources: limits: cpus: '2' memory: 1.5G reservations: cpus: '0.25' memory: 500M # 网站应用服务 xiaomayi-web-biz: # 镜像 image: 192.168.10.102:8001/xiaomayi/xiaomayi-web-biz:${VERSION:-latest} # 容器名 container_name: xiaomayi-web-biz # 重启方式 restart: always # 网络模式 network_mode: host # 端口映射 ports: - 9031:9031 volumes: - /etc/hosts:/etc/hosts:ro - $PWD/upload:/opt/apps/upload # 发布 deploy: resources: limits: cpus: '2' memory: 1.5G reservations: cpus: '0.25' memory: 500M # 客户端应用服务 xiaomayi-uniapp-biz: # 镜像 image: 192.168.10.102:8001/xiaomayi/xiaomayi-uniapp-biz:${VERSION:-latest} # 容器名 container_name: xiaomayi-uniapp-biz # 重启方式 restart: always # 网络模式 network_mode: host # 端口映射 ports: - 9032:9032 volumes: - /etc/hosts:/etc/hosts:ro - $PWD/upload:/opt/apps/upload # 发布 deploy: resources: limits: cpus: '2' memory: 1.5G reservations: cpus: '0.25' memory: 500M # 后端系统服务 xiaomayi-system-biz: # 镜像 image: 192.168.10.102:8001/xiaomayi/xiaomayi-system-biz:${VERSION:-latest} # 容器名 container_name: xiaomayi-system-biz # 重启方式 restart: always # 网络模式 network_mode: host # 端口映射 ports: - 9040:9040 volumes: - /etc/hosts:/etc/hosts:ro - $PWD/upload:/opt/apps/upload # 发布 deploy: resources: limits: cpus: '2' memory: 1.5G reservations: cpus: '0.25' memory: 500M # 后端用户服务 xiaomayi-user-biz: # 镜像 image: 192.168.10.102:8001/xiaomayi/xiaomayi-user-biz:${VERSION:-latest} # 容器名 container_name: xiaomayi-user-biz # 重启方式 restart: always # 网络模式 network_mode: host # 端口映射 ports: - 9042:9042 volumes: - /etc/hosts:/etc/hosts:ro - $PWD/upload:/opt/apps/upload # 发布 deploy: resources: limits: cpus: '2' memory: 1.5G reservations: cpus: '0.25' memory: 500M # 后端CMS服务 xiaomayi-cms-biz: # 镜像 image: 192.168.10.102:8001/xiaomayi/xiaomayi-cms-biz:${VERSION:-latest} # 容器名 container_name: xiaomayi-cms-biz # 重启方式 restart: always # 网络模式 network_mode: host # 端口映射 ports: - 9043:9043 volumes: - /etc/hosts:/etc/hosts:ro - $PWD/upload:/opt/apps/upload # 发布 deploy: resources: limits: cpus: '2' memory: 1.5G reservations: cpus: '0.25' memory: 500M # 订单服务 xiaomayi-order-biz: # 镜像 image: 192.168.10.102:8001/xiaomayi/xiaomayi-order-biz:${VERSION:-latest} # 容器名 container_name: xiaomayi-order-biz # 重启方式 restart: always # 网络模式 network_mode: host # 端口映射 ports: - 9042:9042 volumes: - /etc/hosts:/etc/hosts:ro - $PWD/upload:/opt/apps/upload # 发布 deploy: resources: limits: cpus: '2' memory: 1.5G reservations: cpus: '0.25' memory: 500M # 产品服务 xiaomayi-product-biz: # 镜像 image: 192.168.10.102:8001/xiaomayi/xiaomayi-product-biz:${VERSION:-latest} # 容器名 container_name: xiaomayi-product-biz # 重启方式 restart: always # 网络模式 network_mode: host # 端口映射 ports: - 9046:9046 volumes: - /etc/hosts:/etc/hosts:ro - $PWD/upload:/opt/apps/upload # 发布 deploy: resources: limits: cpus: '2' memory: 1.5G reservations: cpus: '0.25' memory: 500M # 后端生成器服务 xiaomayi-generator: # 镜像 image: 192.168.10.102:8001/xiaomayi/xiaomayi-generator:${VERSION:-latest} # 容器名 container_name: xiaomayi-generator # 重启方式 restart: always # 网络模式 network_mode: host # 端口映射 ports: - 9041:9041 volumes: - /etc/hosts:/etc/hosts:ro - $PWD/upload:/opt/apps/upload # 发布 deploy: resources: limits: cpus: '2' memory: 1.5G reservations: cpus: '0.25' memory: 500M # 任务调度 xiaomayi-job: # 镜像 image: 192.168.10.102:8001/xiaomayi/xiaomayi-job:${VERSION:-latest} # 容器名 container_name: xiaomayi-job # 重启方式 restart: always # 网络模式 network_mode: host # 端口映射 ports: - 9044:9044 volumes: - /etc/hosts:/etc/hosts:ro # 发布 deploy: resources: limits: cpus: '2' memory: 1.5G reservations: cpus: '0.25' memory: 500M