Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions apps/safeline/.env
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
43 changes: 34 additions & 9 deletions apps/safeline/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -90,20 +100,25 @@ 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:
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
networks:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.8
chaos:
container_name: safeline-chaos
restart: always
Expand All @@ -118,6 +133,9 @@ services:
volumes:
- sock:/app/sock
- chaos:/app/chaos
networks:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.10

volumes:
data:
Expand All @@ -133,6 +151,13 @@ volumes:


networks:
default:
external: true
name: $W9_NETWORK
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