feat:更新长亭雷池

This commit is contained in:
okxlin 2023-08-12 19:20:42 +08:00
parent 517527ae3a
commit 9bdfd0bf0e
7 changed files with 394 additions and 2 deletions

View File

@ -1,4 +1,4 @@
name: 雷池
name: 雷池 safeline
tags:
- 工具
title: 一款足够简单、足够好用、足够强的免费 WAF
@ -6,7 +6,7 @@ type: 工具
description: 一款足够简单、足够好用、足够强的免费 WAF
additionalProperties:
key: safeline
name: 雷池
name: 雷池 safeline
tags:
- Tool
shortDescZh: 一款足够简单、足够好用、足够强的免费 WAF

View File

@ -0,0 +1,9 @@
CONTAINER_NAME="safeline"
PANEL_APP_PORT_HTTP="40080"
PANEL_APP_PORT_HTTP2="40081"
POSTGRES_PASSWORD="password_xxJdZD"
REDIS_HOST="redis"
REDIS_PASSWORD=""
REDIS_PORT="6379"
SAFELINE_DIR="./data"
SUBNET_PREFIX="169.254.0"

View File

@ -0,0 +1,64 @@
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_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: 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
labelEn: Data storage folder
labelZh: 数据存放文件夹
required: true
type: text
- default: 169.254.0
edit: true
envKey: SUBNET_PREFIX
labelEn: Subnet prefix
labelZh: 子网前缀
required: true
type: text

View File

@ -0,0 +1,123 @@
version: '3'
services:
safeline-postgres:
container_name: ${CONTAINER_NAME}-postgres
restart: always
networks:
1panel-network:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.2
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:
1panel-network:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.4
image: chaitin/safeline-mgt-api:2.6.0
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://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
cap_drop:
- net_raw
labels:
createdBy: Apps
safeline-detector:
container_name: ${CONTAINER_NAME}-detector
restart: always
networks:
1panel-network:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.5
image: chaitin/safeline-detector:2.6.0
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:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.6
image: chaitin/safeline-mario:2.6.0
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://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
- 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:2.6.0
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}.4:9002
ulimits:
nofile: 131072
network_mode: host
labels:
createdBy: Apps
networks:
1panel-network:
external: true
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

View File

@ -0,0 +1,9 @@
CONTAINER_NAME="safeline"
PANEL_APP_PORT_HTTP="40080"
PANEL_APP_PORT_HTTP2="40081"
POSTGRES_PASSWORD="password_xxJdZD"
REDIS_HOST="redis"
REDIS_PASSWORD=""
REDIS_PORT="6379"
SAFELINE_DIR="./data"
SUBNET_PREFIX="169.254.0"

View File

@ -0,0 +1,64 @@
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_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: 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
labelEn: Data storage folder
labelZh: 数据存放文件夹
required: true
type: text
- default: 169.254.0
edit: true
envKey: SUBNET_PREFIX
labelEn: Subnet prefix
labelZh: 子网前缀
required: true
type: text

View File

@ -0,0 +1,123 @@
version: '3'
services:
safeline-postgres:
container_name: ${CONTAINER_NAME}-postgres
restart: always
networks:
1panel-network:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.2
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:
1panel-network:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.4
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://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
cap_drop:
- net_raw
labels:
createdBy: Apps
safeline-detector:
container_name: ${CONTAINER_NAME}-detector
restart: always
networks:
1panel-network:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.5
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:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.6
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://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
- 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}.4:9002
ulimits:
nofile: 131072
network_mode: host
labels:
createdBy: Apps
networks:
1panel-network:
external: true
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