fix:修正长亭雷池

This commit is contained in:
okxlin 2023-08-01 12:54:35 +08:00
parent 3366fbfba7
commit 057f8f119a
10 changed files with 88 additions and 306 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -1,10 +1,7 @@
CONTAINER_NAME="safeline"
MGT_PORT="40080"
POSTGRES_DB="safeline"
POSTGRES_HOST="postgres"
PANEL_APP_PORT_HTTP="40080"
PANEL_APP_PORT_HTTP2="40081"
POSTGRES_PASSWORD="password_xxJdZD"
POSTGRES_PORT="5432"
POSTGRES_USER="postgresql"
REDIS_HOST="redis"
REDIS_PASSWORD=""
REDIS_PORT="6379"

View File

@ -24,38 +24,6 @@ additionalProperties:
required: true
rule: paramCommon
type: password
- default: ""
edit: true
envKey: POSTGRES_HOST
key: postgresql
labelEn: Postgres database Service
labelZh: Postgres数据库服务
required: true
type: service
- default: "5432"
edit: true
envKey: POSTGRES_PORT
labelEn: Postgres database Service Port
labelZh: Postgres数据库服务端口
required: true
rule: paramPort
type: number
- default: safeline
edit: true
envKey: POSTGRES_DB
labelEn: Postgres database Name
labelZh: Postgres数据库名
required: true
rule: paramCommon
type: text
- default: ""
edit: true
envKey: POSTGRES_USER
labelEn: Postgres database User Name
labelZh: Postgres数据库用户名
required: true
rule: paramCommon
type: text
- default: ""
edit: true
envKey: POSTGRES_PASSWORD
@ -72,6 +40,14 @@ additionalProperties:
required: true
rule: paramPort
type: number
- default: 40081
edit: true
envKey: PANEL_APP_PORT_HTTP2
labelEn: Detector Port
labelZh: Detector端口
required: true
rule: paramPort
type: number
- default: ./data
edit: true
envKey: SAFELINE_DIR
@ -79,8 +55,8 @@ additionalProperties:
labelZh: 数据存放文件夹
required: true
type: text
- default: 169.254.0
edit: true
- default: 172.18.0
edit: false
envKey: SUBNET_PREFIX
labelEn: Subnet prefix
labelZh: 子网前缀

View File

@ -1,11 +1,30 @@
version: '3'
services:
safeline-postgres:
container_name: ${CONTAINER_NAME}-postgres
restart: always
networks:
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.232
image: postgres:15.3
volumes:
- ${SAFELINE_DIR}/resources/postgres/data:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
environment:
- POSTGRES_USER=safeline-ce
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
cap_drop:
- net_raw
command: [postgres, -c, max_connections=200]
labels:
createdBy: Apps
safeline-management:
container_name: ${CONTAINER_NAME}-mgt-api
restart: always
networks:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.4
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.234
image: chaitin/safeline-mgt-api:2.4.0
volumes:
- ${SAFELINE_DIR}/resources/management:/resources/management
@ -17,7 +36,7 @@ services:
environment:
- MANAGEMENT_RESOURCES_DIR=/resources/management
- NGINX_RESOURCES_DIR=/resources/nginx
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
- DATABASE_URL=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
- MARIO_URL=http://safeline-mario:3335
- DETECTOR_URL=http://safeline-detector:8001
- MANAGEMENT_LOGS_DIR=/logs/management
@ -30,13 +49,15 @@ services:
container_name: ${CONTAINER_NAME}-detector
restart: always
networks:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.5
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.235
image: chaitin/safeline-detector:2.4.0
volumes:
- ${SAFELINE_DIR}/resources/detector:/resources/detector
- ${SAFELINE_DIR}/logs/detector:/logs/detector
- /etc/localtime:/etc/localtime:ro
ports:
- ${PANEL_APP_PORT_HTTP2}:8000
environment:
- LOG_DIR=/logs/detector
cap_drop:
@ -48,8 +69,8 @@ services:
container_name: ${CONTAINER_NAME}-mario
restart: always
networks:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.6
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.236
image: chaitin/safeline-mario:2.4.0
volumes:
- ${SAFELINE_DIR}/resources/mario:/resources/mario
@ -58,7 +79,7 @@ services:
environment:
- LOG_DIR=/logs/mario
- GOGC=100
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
- DATABASE_URL=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
- REDIS_URL=redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0
cap_drop:
- net_raw
@ -78,7 +99,7 @@ services:
- ${SAFELINE_DIR}/resources/cache:/usr/local/nginx/cache
- /etc/resolv.conf:/etc/resolv.conf
environment:
- MGT_ADDR=${SUBNET_PREFIX}.4:9002
- MGT_ADDR=${SUBNET_PREFIX}.234:9002
ulimits:
nofile: 131072
network_mode: host
@ -86,13 +107,5 @@ services:
createdBy: Apps
networks:
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
1panel-network:
external: true

View File

@ -1,12 +0,0 @@
CONTAINER_NAME="safeline"
MGT_PORT="40080"
POSTGRES_DB="safeline"
POSTGRES_HOST="postgres"
POSTGRES_PASSWORD="password_xxJdZD"
POSTGRES_PORT="5432"
POSTGRES_USER="postgresql"
REDIS_HOST="redis"
REDIS_PASSWORD=""
REDIS_PORT="6379"
SAFELINE_DIR="./data"
SUBNET_PREFIX="172.18.0"

View File

@ -1,88 +0,0 @@
additionalProperties:
formFields:
- default: ""
edit: true
envKey: REDIS_HOST
key: redis
labelEn: Redis Service
labelZh: Redis服务
required: true
type: service
- default: "6379"
edit: true
envKey: REDIS_PORT
labelEn: Redis Service Port
labelZh: Redis服务端口
required: true
rule: paramPort
type: number
- default: ""
edit: true
envKey: REDIS_PASSWORD
labelEn: Redis Service Password
labelZh: Redis服务密码
required: true
rule: paramCommon
type: password
- default: ""
edit: true
envKey: POSTGRES_HOST
key: postgresql
labelEn: Postgres database Service
labelZh: Postgres数据库服务
required: true
type: service
- default: "5432"
edit: true
envKey: POSTGRES_PORT
labelEn: Postgres database Service Port
labelZh: Postgres数据库服务端口
required: true
rule: paramPort
type: number
- default: safeline
edit: true
envKey: POSTGRES_DB
labelEn: Postgres database Name
labelZh: Postgres数据库名
required: true
rule: paramCommon
type: text
- default: ""
edit: true
envKey: POSTGRES_USER
labelEn: Postgres database User Name
labelZh: Postgres数据库用户名
required: true
rule: paramCommon
type: text
- default: ""
edit: true
envKey: POSTGRES_PASSWORD
labelEn: Postgres database User Password
labelZh: Postgres数据库密码
required: true
rule: paramCommon
type: password
- default: 40080
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
- default: ./data
edit: true
envKey: SAFELINE_DIR
labelEn: Data storage folder
labelZh: 数据存放文件夹
required: true
type: text
- default: 172.18.0
edit: false
envKey: SUBNET_PREFIX
labelEn: Subnet prefix
labelZh: 子网前缀
required: true
type: text

View File

@ -1,90 +0,0 @@
version: '3'
services:
safeline-management:
container_name: ${CONTAINER_NAME}-mgt-api
restart: always
networks:
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.234
image: chaitin/safeline-mgt-api:latest
volumes:
- ${SAFELINE_DIR}/resources/management:/resources/management
- ${SAFELINE_DIR}/resources/nginx:/resources/nginx
- ${SAFELINE_DIR}/logs:/logs
- /etc/localtime:/etc/localtime:ro
ports:
- ${PANEL_APP_PORT_HTTP:-9443}:1443
environment:
- MANAGEMENT_RESOURCES_DIR=/resources/management
- NGINX_RESOURCES_DIR=/resources/nginx
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
- MARIO_URL=http://safeline-mario:3335
- DETECTOR_URL=http://safeline-detector:8001
- MANAGEMENT_LOGS_DIR=/logs/management
cap_drop:
- net_raw
labels:
createdBy: Apps
safeline-detector:
container_name: ${CONTAINER_NAME}-detector
restart: always
networks:
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.235
image: chaitin/safeline-detector:latest
volumes:
- ${SAFELINE_DIR}/resources/detector:/resources/detector
- ${SAFELINE_DIR}/logs/detector:/logs/detector
- /etc/localtime:/etc/localtime:ro
environment:
- LOG_DIR=/logs/detector
cap_drop:
- net_raw
labels:
createdBy: Apps
safeline-mario:
container_name: ${CONTAINER_NAME}-mario
restart: always
networks:
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.236
image: chaitin/safeline-mario:latest
volumes:
- ${SAFELINE_DIR}/resources/mario:/resources/mario
- ${SAFELINE_DIR}/logs/mario:/logs/mario
- /etc/localtime:/etc/localtime:ro
environment:
- LOG_DIR=/logs/mario
- GOGC=100
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
- REDIS_URL=redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0
cap_drop:
- net_raw
labels:
createdBy: Apps
safeline-tengine:
container_name: ${CONTAINER_NAME}-tengine
restart: always
image: chaitin/safeline-tengine:latest
volumes:
- ${SAFELINE_DIR}/resources/nginx:/etc/nginx
- ${SAFELINE_DIR}/resources/management:/resources/management
- ${SAFELINE_DIR}/resources/detector:/resources/detector
- ${SAFELINE_DIR}/logs/nginx:/var/log/nginx
- /etc/localtime:/etc/localtime:ro
- ${SAFELINE_DIR}/resources/cache:/usr/local/nginx/cache
- /etc/resolv.conf:/etc/resolv.conf
environment:
- MGT_ADDR=${SUBNET_PREFIX}.234:9002
ulimits:
nofile: 131072
network_mode: host
labels:
createdBy: Apps
networks:
1panel-network:
external: true

View File

@ -1,10 +1,7 @@
CONTAINER_NAME="safeline"
MGT_PORT="40080"
POSTGRES_DB="safeline"
POSTGRES_HOST="postgres"
PANEL_APP_PORT_HTTP="40080"
PANEL_APP_PORT_HTTP2="40081"
POSTGRES_PASSWORD="password_xxJdZD"
POSTGRES_PORT="5432"
POSTGRES_USER="postgresql"
REDIS_HOST="redis"
REDIS_PASSWORD=""
REDIS_PORT="6379"

View File

@ -24,38 +24,6 @@ additionalProperties:
required: true
rule: paramCommon
type: password
- default: ""
edit: true
envKey: POSTGRES_HOST
key: postgresql
labelEn: Postgres database Service
labelZh: Postgres数据库服务
required: true
type: service
- default: "5432"
edit: true
envKey: POSTGRES_PORT
labelEn: Postgres database Service Port
labelZh: Postgres数据库服务端口
required: true
rule: paramPort
type: number
- default: safeline
edit: true
envKey: POSTGRES_DB
labelEn: Postgres database Name
labelZh: Postgres数据库名
required: true
rule: paramCommon
type: text
- default: ""
edit: true
envKey: POSTGRES_USER
labelEn: Postgres database User Name
labelZh: Postgres数据库用户名
required: true
rule: paramCommon
type: text
- default: ""
edit: true
envKey: POSTGRES_PASSWORD
@ -72,6 +40,14 @@ additionalProperties:
required: true
rule: paramPort
type: number
- default: 40081
edit: true
envKey: PANEL_APP_PORT_HTTP2
labelEn: Detector Port
labelZh: Detector端口
required: true
rule: paramPort
type: number
- default: ./data
edit: true
envKey: SAFELINE_DIR
@ -79,8 +55,8 @@ additionalProperties:
labelZh: 数据存放文件夹
required: true
type: text
- default: 169.254.0
edit: true
- default: 172.18.0
edit: false
envKey: SUBNET_PREFIX
labelEn: Subnet prefix
labelZh: 子网前缀

View File

@ -1,11 +1,30 @@
version: '3'
services:
safeline-postgres:
container_name: ${CONTAINER_NAME}-postgres
restart: always
networks:
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.232
image: postgres:15.3
volumes:
- ${SAFELINE_DIR}/resources/postgres/data:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
environment:
- POSTGRES_USER=safeline-ce
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
cap_drop:
- net_raw
command: [postgres, -c, max_connections=200]
labels:
createdBy: Apps
safeline-management:
container_name: ${CONTAINER_NAME}-mgt-api
restart: always
networks:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.4
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.234
image: chaitin/safeline-mgt-api:latest
volumes:
- ${SAFELINE_DIR}/resources/management:/resources/management
@ -17,7 +36,7 @@ services:
environment:
- MANAGEMENT_RESOURCES_DIR=/resources/management
- NGINX_RESOURCES_DIR=/resources/nginx
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
- DATABASE_URL=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
- MARIO_URL=http://safeline-mario:3335
- DETECTOR_URL=http://safeline-detector:8001
- MANAGEMENT_LOGS_DIR=/logs/management
@ -30,13 +49,15 @@ services:
container_name: ${CONTAINER_NAME}-detector
restart: always
networks:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.5
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.235
image: chaitin/safeline-detector:latest
volumes:
- ${SAFELINE_DIR}/resources/detector:/resources/detector
- ${SAFELINE_DIR}/logs/detector:/logs/detector
- /etc/localtime:/etc/localtime:ro
ports:
- ${PANEL_APP_PORT_HTTP2}:8000
environment:
- LOG_DIR=/logs/detector
cap_drop:
@ -48,8 +69,8 @@ services:
container_name: ${CONTAINER_NAME}-mario
restart: always
networks:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.6
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.236
image: chaitin/safeline-mario:latest
volumes:
- ${SAFELINE_DIR}/resources/mario:/resources/mario
@ -58,7 +79,7 @@ services:
environment:
- LOG_DIR=/logs/mario
- GOGC=100
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
- DATABASE_URL=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
- REDIS_URL=redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0
cap_drop:
- net_raw
@ -78,7 +99,7 @@ services:
- ${SAFELINE_DIR}/resources/cache:/usr/local/nginx/cache
- /etc/resolv.conf:/etc/resolv.conf
environment:
- MGT_ADDR=${SUBNET_PREFIX}.4:9002
- MGT_ADDR=${SUBNET_PREFIX}.234:9002
ulimits:
nofile: 131072
network_mode: host
@ -86,13 +107,5 @@ services:
createdBy: Apps
networks:
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
1panel-network:
external: true