version: '3.8' networks: aiot-network: driver: bridge volumes: app-logs: services: viewsh-gateway: image: ${REGISTRY_HOST:-localhost:5000}/viewsh-gateway:${IMAGE_TAG:-latest} container_name: aiot-gateway restart: on-failure:5 network_mode: host environment: # ===== 基础配置 ===== TZ: Asia/Shanghai SPRING_PROFILES_ACTIVE: prod # ===== JVM 配置 ===== JAVA_OPTS: "-Xms512m -Xmx1024m -XX:+UseContainerSupport -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/app/logs" # ===== Nacos 配置 ===== NACOS_USERNAME: nacos NACOS_PASSWORD: 9oDxX~}e7DeP NACOS_ADDR: 172.17.16.14:8848 NACOS_DISCOVERY_NAMESPACE: "8efd6d96-de7f-4664-b28e-c2788ffa1395" NACOS_CONFIG_NAMESPACE: "8efd6d96-de7f-4664-b28e-c2788ffa1395" # ===== Redis 配置 ===== SPRING_DATA_REDIS_HOST: 172.17.16.14 SPRING_DATA_REDIS_PORT: 6379 SPRING_DATA_REDIS_PASSWORD: "9kHXcZ1ojFsD" # TODO: 填入实际的 Redis 密码 volumes: - app-logs:/app/logs deploy: resources: limits: memory: 1536m cpus: '1.0' healthcheck: test: ["CMD", "curl", "-f", "http://localhost:48080/actuator/health"] interval: 10s timeout: 5s retries: 12 start_period: 120s viewsh-module-system-server: image: ${REGISTRY_HOST:-localhost:5000}/viewsh-module-system-server:${IMAGE_TAG:-latest} container_name: aiot-system-server restart: on-failure:5 network_mode: host environment: TZ: Asia/Shanghai SPRING_PROFILES_ACTIVE: prod JAVA_OPTS: "-Xms512m -Xmx1024m -XX:+UseContainerSupport -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/app/logs" # ===== Nacos 配置 ===== NACOS_USERNAME: nacos NACOS_PASSWORD: 9oDxX~}e7DeP NACOS_ADDR: 172.17.16.14:8848 NACOS_DISCOVERY_NAMESPACE: "8efd6d96-de7f-4664-b28e-c2788ffa1395" NACOS_CONFIG_NAMESPACE: "8efd6d96-de7f-4664-b28e-c2788ffa1395" # 数据库 SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_URL: jdbc:mysql://172.17.16.14:3306/aiot_platform?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_USERNAME: root # TODO: 填入数据库用户名 SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_PASSWORD: "65p^VTPi9Qd+" # TODO: 填入数据库密码 # Redis SPRING_DATA_REDIS_HOST: 172.17.16.14 SPRING_DATA_REDIS_PASSWORD: "9kHXcZ1ojFsD" # TODO: 填入 Redis 密码 volumes: - app-logs:/app/logs deploy: resources: limits: memory: 1536m cpus: '1.0' healthcheck: test: ["CMD", "curl", "-f", "http://localhost:48081/actuator/health"] interval: 10s timeout: 5s retries: 12 start_period: 120s depends_on: viewsh-gateway: condition: service_healthy viewsh-module-infra-server: image: ${REGISTRY_HOST:-localhost:5000}/viewsh-module-infra-server:${IMAGE_TAG:-latest} container_name: aiot-infra-server restart: on-failure:5 network_mode: host environment: TZ: Asia/Shanghai SPRING_PROFILES_ACTIVE: prod JAVA_OPTS: "-Xms512m -Xmx1024m -XX:+UseContainerSupport -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/app/logs" NACOS_USERNAME: nacos NACOS_PASSWORD: 9oDxX~}e7DeP NACOS_ADDR: 172.17.16.14:8848 NACOS_DISCOVERY_NAMESPACE: "8efd6d96-de7f-4664-b28e-c2788ffa1395" NACOS_CONFIG_NAMESPACE: "8efd6d96-de7f-4664-b28e-c2788ffa1395" SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_URL: jdbc:mysql://172.17.16.14:3306/aiot_platform?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_USERNAME: root SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_PASSWORD: "65p^VTPi9Qd+" SPRING_DATA_REDIS_HOST: 172.17.16.14 SPRING_DATA_REDIS_PASSWORD: "9kHXcZ1ojFsD" volumes: - app-logs:/app/logs healthcheck: test: ["CMD", "curl", "-f", "http://localhost:48082/actuator/health"] interval: 10s timeout: 5s retries: 12 start_period: 120s depends_on: viewsh-module-system-server: condition: service_healthy viewsh-module-iot-server: image: ${REGISTRY_HOST:-localhost:5000}/viewsh-module-iot-server:${IMAGE_TAG:-latest} container_name: aiot-iot-server restart: on-failure:5 network_mode: host environment: TZ: Asia/Shanghai SPRING_PROFILES_ACTIVE: prod JAVA_OPTS: "-Xms1024m -Xmx2048m -XX:+UseContainerSupport -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/app/logs" NACOS_USERNAME: nacos NACOS_PASSWORD: 9oDxX~}e7DeP NACOS_ADDR: 172.17.16.14:8848 NACOS_DISCOVERY_NAMESPACE: "8efd6d96-de7f-4664-b28e-c2788ffa1395" NACOS_CONFIG_NAMESPACE: "8efd6d96-de7f-4664-b28e-c2788ffa1395" SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_URL: jdbc:mysql://172.17.16.14:3306/aiot_platform?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_USERNAME: root SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_PASSWORD: "65p^VTPi9Qd+" SPRING_DATA_REDIS_HOST: 172.17.16.14 SPRING_DATA_REDIS_PASSWORD: "9kHXcZ1ojFsD" ROCKETMQ_NAME_SERVER: 172.17.16.14:9876 volumes: - app-logs:/app/logs deploy: resources: limits: memory: 2560m cpus: '1.5' healthcheck: test: ["CMD", "curl", "-f", "http://localhost:48083/actuator/health"] interval: 10s timeout: 5s retries: 12 start_period: 120s depends_on: viewsh-module-infra-server: condition: service_healthy viewsh-module-iot-gateway: image: ${REGISTRY_HOST:-localhost:5000}/viewsh-module-iot-gateway:${IMAGE_TAG:-latest} container_name: aiot-iot-gateway restart: on-failure:5 network_mode: host environment: TZ: Asia/Shanghai SPRING_PROFILES_ACTIVE: prod JAVA_OPTS: "-Xms1024m -Xmx2048m -XX:+UseContainerSupport -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/app/logs" NACOS_USERNAME: nacos NACOS_PASSWORD: 9oDxX~}e7DeP NACOS_ADDR: 172.17.16.14:8848 NACOS_DISCOVERY_NAMESPACE: "8efd6d96-de7f-4664-b28e-c2788ffa1395" NACOS_CONFIG_NAMESPACE: "8efd6d96-de7f-4664-b28e-c2788ffa1395" SPRING_DATA_REDIS_HOST: 172.17.16.14 SPRING_DATA_REDIS_PASSWORD: "9kHXcZ1ojFsD" ROCKETMQ_NAME_SERVER: 172.17.16.14:9876 volumes: - app-logs:/app/logs deploy: resources: limits: memory: 2560m cpus: '1.5' healthcheck: test: ["CMD", "curl", "-f", "http://localhost:48084/actuator/health"] interval: 10s timeout: 5s retries: 12 start_period: 120s depends_on: viewsh-module-iot-server: condition: service_healthy