From 3cd72df49caf6c171396caf4d2123d50831a2b0f Mon Sep 17 00:00:00 2001 From: websoft9 Date: Sat, 31 Jan 2026 07:14:49 +0000 Subject: [PATCH] Update safeline --- apps/safeline/.env | 12 ++++----- apps/safeline/docker-compose.yml | 43 +++++++++++++++++++++++++------- 2 files changed, 39 insertions(+), 16 deletions(-) diff --git a/apps/safeline/.env b/apps/safeline/.env index 3c591cee5..5b107a80b 100644 --- a/apps/safeline/.env +++ b/apps/safeline/.env @@ -1,10 +1,7 @@ W9_REPO="swr.cn-east-3.myhuaweicloud.com/chaitin-safeline/safeline" -W9_DIST=community -W9_VERSION="latest" - -W9_POWER_PASSWORD="1PrMxExC45LsCT" - -W9_RCODE='V3G8Jqzk15kHy' +W9_DIST='community' +W9_VERSION='9.3.2' +W9_POWER_PASSWORD='zWA2Ds!7R58loJrh' # Environments which for user settings when create application # Named expression: W9_xxx_xxx_SET, xxx refer to file fields @@ -24,6 +21,7 @@ W9_URL_REPLACE=true W9_NETWORK=websoft9 -POSTGRES_PASSWORD=$W9_POWER_PASSWORD #-------(自定义密码使用数字+英文大小写组合,勿使用特殊字符) +POSTGRES_PASSWORD=$W9_POWER_PASSWORD MGT_PROXY=0 +SUBNET_PREFIX=192.168.0 diff --git a/apps/safeline/docker-compose.yml b/apps/safeline/docker-compose.yml index ab175e6cf..fa90c1dc2 100644 --- a/apps/safeline/docker-compose.yml +++ b/apps/safeline/docker-compose.yml @@ -9,6 +9,9 @@ services: volumes: - data:/var/lib/postgresql/data - /etc/localtime:/etc/localtime:ro + networks: + safeline-ce: + ipv4_address: ${SUBNET_PREFIX}.2 environment: - POSTGRES_USER=safeline-ce - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?postgres password required} @@ -41,6 +44,9 @@ services: options: max-size: "100m" max-file: "5" + networks: + safeline-ce: + ipv4_address: ${SUBNET_PREFIX}.4 detect: container_name: safeline-detector restart: always @@ -51,7 +57,9 @@ services: - /etc/localtime:/etc/localtime:ro environment: - LOG_DIR=/logs/detector - - MGT_HOST=safeline-mgt + networks: + safeline-ce: + ipv4_address: ${SUBNET_PREFIX}.5 tengine: container_name: safeline-tengine restart: always @@ -66,8 +74,11 @@ services: - cache:/usr/local/nginx/cache - sock:/app/sock environment: - - TCD_MGT_API=https://safeline-mgt:1443/api/open/publish/server - - CHALLENGE_SERVER=safeline-chaos:8080 + - TCD_MGT_API=https://${SUBNET_PREFIX}.4:1443/api/open/publish/server + - TCD_SNSERVER=${SUBNET_PREFIX}.5:8000 + # deprecated + - SNSERVER_ADDR=${SUBNET_PREFIX}.5:8000 + - CHAOS_ADDR=${SUBNET_PREFIX}.10 ulimits: nofile: 131072 network_mode: host @@ -76,8 +87,7 @@ services: restart: always image: ${W9_REPO}-luigi:${W9_VERSION} environment: - - MGT_IP=${W9_ID} - - DETECTOR_HOST=safeline-detector + - MGT_IP=${SUBNET_PREFIX}.4 - LUIGI_PG=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-pg/safeline-ce?sslmode=disable volumes: - /etc/localtime:/etc/localtime:ro @@ -90,13 +100,15 @@ services: depends_on: - detect - mgt + networks: + safeline-ce: + ipv4_address: ${SUBNET_PREFIX}.7 fvm: container_name: safeline-fvm restart: always image: ${W9_REPO}-fvm:${W9_VERSION} environment: - MGT_HOST=${W9_ID} - - DETECTOR_HOST=safeline-detector volumes: - /etc/localtime:/etc/localtime:ro logging: @@ -104,6 +116,9 @@ services: options: max-size: "100m" max-file: "5" + networks: + safeline-ce: + ipv4_address: ${SUBNET_PREFIX}.8 chaos: container_name: safeline-chaos restart: always @@ -118,6 +133,9 @@ services: volumes: - sock:/app/sock - chaos:/app/chaos + networks: + safeline-ce: + ipv4_address: ${SUBNET_PREFIX}.10 volumes: data: @@ -133,6 +151,13 @@ volumes: networks: - default: - external: true - name: $W9_NETWORK \ No newline at end of file + safeline-ce: + name: safeline-ce + driver: bridge + ipam: + driver: default + config: + - gateway: ${SUBNET_PREFIX:?SUBNET_PREFIX required}.1 + subnet: ${SUBNET_PREFIX}.0/24 + driver_opts: + com.docker.network.bridge.name: safeline-ce \ No newline at end of file