feat:长亭雷池redis不再独立部署

This commit is contained in:
okxlin 2023-11-03 15:52:36 +08:00
parent e467185fdd
commit 7740e63575
12 changed files with 194 additions and 116 deletions

View File

@ -2,8 +2,8 @@ CONTAINER_NAME="safeline"
PANEL_APP_PORT_HTTP="40080"
PANEL_APP_PORT_HTTP2="40081"
POSTGRES_PASSWORD="password_xxJdZD"
REDIS_HOST="redis"
PANEL_REDIS_ROOT_PASSWORD=""
REDIS_HOST="safeline-redis"
PANEL_REDIS_ROOT_PASSWORD="redis_password"
REDIS_PORT="6379"
SAFELINE_DIR="./data"
SUBNET_PREFIX="172.18.0"

View File

@ -1,15 +1,15 @@
additionalProperties:
formFields:
- default: ""
edit: true
- default: "safeline-redis"
disabled: true
envKey: REDIS_HOST
key: redis
labelEn: Redis Service
labelZh: Redis服务
required: true
type: service
type: text
- default: "6379"
edit: true
disabled: true
envKey: REDIS_PORT
labelEn: Redis Service Port
labelZh: Redis服务端口
@ -58,7 +58,7 @@ additionalProperties:
- default: 172.18.0
edit: true
envKey: SUBNET_PREFIX
labelEn: 1panel-network subnet prefix
labelZh: 1panel-network 子网前缀
labelEn: 1panel-network subnet prefix (Check the docker network to get it)
labelZh: 1panel-network 子网前缀 (查看docker网络获取)
required: true
type: text
type: text

View File

@ -1,24 +1,5 @@
version: '3'
services:
safeline-postgres:
container_name: ${CONTAINER_NAME}-postgres
restart: always
networks:
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.232
image: postgres:15.4-bookworm
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
@ -39,7 +20,7 @@ services:
- DATABASE_URL=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
- MARIO_URL=http://safeline-mario:3335
- DETECTOR_URL=http://safeline-detector:8001
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/2
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0
- MANAGEMENT_LOGS_DIR=/logs/management
dns:
- 119.29.29.29
@ -88,7 +69,7 @@ services:
- LOG_DIR=/logs/mario
- GOGC=100
- DATABASE_URL=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/2
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0
cap_drop:
- net_raw
labels:
@ -107,6 +88,7 @@ services:
- ${SAFELINE_DIR}/resources/cache:/usr/local/nginx/cache
- /etc/resolv.conf:/etc/resolv.conf
environment:
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${SUBNET_PREFIX}.233:${REDIS_PORT}/0
- MGT_ADDR=${SUBNET_PREFIX}.234:9002
ulimits:
nofile: 131072
@ -114,6 +96,43 @@ services:
labels:
createdBy: Apps
safeline-postgres:
container_name: ${CONTAINER_NAME}-postgres
restart: always
networks:
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.232
image: postgres:15.4-bookworm
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-redis:
container_name: ${CONTAINER_NAME}-redis
restart: always
networks:
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.233
image: redis:7.2.2
volumes:
- ${SAFELINE_DIR}/resources/redis/data:/data
- /etc/localtime:/etc/localtime:ro
command: redis-server --appendonly yes --requirepass ${PANEL_REDIS_ROOT_PASSWORD}
cap_drop:
- net_raw
sysctls:
net.core.somaxconn: "511"
labels:
createdBy: Apps
networks:
1panel-network:
external: true

View File

@ -2,8 +2,8 @@ CONTAINER_NAME="safeline"
PANEL_APP_PORT_HTTP="40080"
PANEL_APP_PORT_HTTP2="40081"
POSTGRES_PASSWORD="password_xxJdZD"
REDIS_HOST="redis"
PANEL_REDIS_ROOT_PASSWORD=""
REDIS_HOST="safeline-redis"
PANEL_REDIS_ROOT_PASSWORD="redis_password"
REDIS_PORT="6379"
SAFELINE_DIR="./data"
SUBNET_PREFIX="172.18.0"

View File

@ -1,15 +1,15 @@
additionalProperties:
formFields:
- default: ""
edit: true
- default: "safeline-redis"
disabled: true
envKey: REDIS_HOST
key: redis
labelEn: Redis Service
labelZh: Redis服务
required: true
type: service
type: text
- default: "6379"
edit: true
disabled: true
envKey: REDIS_PORT
labelEn: Redis Service Port
labelZh: Redis服务端口
@ -58,7 +58,7 @@ additionalProperties:
- default: 172.18.0
edit: true
envKey: SUBNET_PREFIX
labelEn: 1panel-network subnet prefix
labelZh: 1panel-network 子网前缀
labelEn: 1panel-network subnet prefix (Check the docker network to get it)
labelZh: 1panel-network 子网前缀 (查看docker网络获取)
required: true
type: text
type: text

View File

@ -1,24 +1,5 @@
version: '3'
services:
safeline-postgres:
container_name: ${CONTAINER_NAME}-postgres
restart: always
networks:
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.232
image: postgres:15.4-bookworm
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
@ -39,7 +20,7 @@ services:
- DATABASE_URL=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
- MARIO_URL=http://safeline-mario:3335
- DETECTOR_URL=http://safeline-detector:8001
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/2
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0
- MANAGEMENT_LOGS_DIR=/logs/management
dns:
- 119.29.29.29
@ -88,7 +69,7 @@ services:
- LOG_DIR=/logs/mario
- GOGC=100
- DATABASE_URL=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/2
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0
cap_drop:
- net_raw
labels:
@ -107,6 +88,7 @@ services:
- ${SAFELINE_DIR}/resources/cache:/usr/local/nginx/cache
- /etc/resolv.conf:/etc/resolv.conf
environment:
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${SUBNET_PREFIX}.233:${REDIS_PORT}/0
- MGT_ADDR=${SUBNET_PREFIX}.234:9002
ulimits:
nofile: 131072
@ -114,6 +96,43 @@ services:
labels:
createdBy: Apps
safeline-postgres:
container_name: ${CONTAINER_NAME}-postgres
restart: always
networks:
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.232
image: postgres:15.4-bookworm
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-redis:
container_name: ${CONTAINER_NAME}-redis
restart: always
networks:
1panel-network:
ipv4_address: ${SUBNET_PREFIX}.233
image: redis:7.2.2
volumes:
- ${SAFELINE_DIR}/resources/redis/data:/data
- /etc/localtime:/etc/localtime:ro
command: redis-server --appendonly yes --requirepass ${PANEL_REDIS_ROOT_PASSWORD}
cap_drop:
- net_raw
sysctls:
net.core.somaxconn: "511"
labels:
createdBy: Apps
networks:
1panel-network:
external: true

View File

@ -2,8 +2,8 @@ CONTAINER_NAME="safeline"
PANEL_APP_PORT_HTTP="40080"
PANEL_APP_PORT_HTTP2="40081"
POSTGRES_PASSWORD="password_xxJdZD"
REDIS_HOST="redis"
PANEL_REDIS_ROOT_PASSWORD=""
REDIS_HOST="safeline-redis"
PANEL_REDIS_ROOT_PASSWORD="redis_password"
REDIS_PORT="6379"
SAFELINE_DIR="./data"
SUBNET_PREFIX="169.254.0"

View File

@ -1,15 +1,15 @@
additionalProperties:
formFields:
- default: ""
edit: true
- default: "safeline-redis"
disabled: true
envKey: REDIS_HOST
key: redis
labelEn: Redis Service
labelZh: Redis服务
required: true
type: service
type: text
- default: "6379"
edit: true
disabled: true
envKey: REDIS_PORT
labelEn: Redis Service Port
labelZh: Redis服务端口

View File

@ -1,25 +1,5 @@
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.4-bookworm
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
@ -41,7 +21,7 @@ services:
- DATABASE_URL=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
- MARIO_URL=http://safeline-mario:3335
- DETECTOR_URL=http://safeline-detector:8001
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/2
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0
- MANAGEMENT_LOGS_DIR=/logs/management
dns:
- 119.29.29.29
@ -90,7 +70,7 @@ services:
- LOG_DIR=/logs/mario
- GOGC=100
- DATABASE_URL=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/2
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0
cap_drop:
- net_raw
labels:
@ -109,6 +89,7 @@ services:
- ${SAFELINE_DIR}/resources/cache:/usr/local/nginx/cache
- /etc/resolv.conf:/etc/resolv.conf
environment:
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${SUBNET_PREFIX}.3:${REDIS_PORT}/0
- MGT_ADDR=${SUBNET_PREFIX}.4:9002
ulimits:
nofile: 131072
@ -116,6 +97,45 @@ services:
labels:
createdBy: Apps
safeline-postgres:
container_name: ${CONTAINER_NAME}-postgres
restart: always
networks:
1panel-network:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.2
image: postgres:15.4-bookworm
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-redis:
container_name: ${CONTAINER_NAME}-redis
restart: always
networks:
1panel-network:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.3
image: redis:7.2.2
volumes:
- ${SAFELINE_DIR}/resources/redis/data:/data
- /etc/localtime:/etc/localtime:ro
command: redis-server --appendonly yes --requirepass ${PANEL_REDIS_ROOT_PASSWORD}
cap_drop:
- net_raw
sysctls:
net.core.somaxconn: "511"
labels:
createdBy: Apps
networks:
1panel-network:
external: true

View File

@ -2,8 +2,8 @@ CONTAINER_NAME="safeline"
PANEL_APP_PORT_HTTP="40080"
PANEL_APP_PORT_HTTP2="40081"
POSTGRES_PASSWORD="password_xxJdZD"
REDIS_HOST="redis"
PANEL_REDIS_ROOT_PASSWORD=""
REDIS_HOST="safeline-redis"
PANEL_REDIS_ROOT_PASSWORD="redis_password"
REDIS_PORT="6379"
SAFELINE_DIR="./data"
SUBNET_PREFIX="169.254.0"

View File

@ -1,15 +1,15 @@
additionalProperties:
formFields:
- default: ""
edit: true
- default: "safeline-redis"
disabled: true
envKey: REDIS_HOST
key: redis
labelEn: Redis Service
labelZh: Redis服务
required: true
type: service
type: text
- default: "6379"
edit: true
disabled: true
envKey: REDIS_PORT
labelEn: Redis Service Port
labelZh: Redis服务端口

View File

@ -1,25 +1,5 @@
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.4-bookworm
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
@ -41,7 +21,7 @@ services:
- DATABASE_URL=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
- MARIO_URL=http://safeline-mario:3335
- DETECTOR_URL=http://safeline-detector:8001
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/2
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0
- MANAGEMENT_LOGS_DIR=/logs/management
dns:
- 119.29.29.29
@ -90,7 +70,7 @@ services:
- LOG_DIR=/logs/mario
- GOGC=100
- DATABASE_URL=postgres://safeline-ce:${POSTGRES_PASSWORD}@safeline-postgres/safeline-ce
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/2
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0
cap_drop:
- net_raw
labels:
@ -109,6 +89,7 @@ services:
- ${SAFELINE_DIR}/resources/cache:/usr/local/nginx/cache
- /etc/resolv.conf:/etc/resolv.conf
environment:
- REDIS_URL=redis://:${PANEL_REDIS_ROOT_PASSWORD}@${SUBNET_PREFIX}.3:${REDIS_PORT}/0
- MGT_ADDR=${SUBNET_PREFIX}.4:9002
ulimits:
nofile: 131072
@ -116,6 +97,45 @@ services:
labels:
createdBy: Apps
safeline-postgres:
container_name: ${CONTAINER_NAME}-postgres
restart: always
networks:
1panel-network:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.2
image: postgres:15.4-bookworm
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-redis:
container_name: ${CONTAINER_NAME}-redis
restart: always
networks:
1panel-network:
safeline-ce:
ipv4_address: ${SUBNET_PREFIX}.3
image: redis:7.2.2
volumes:
- ${SAFELINE_DIR}/resources/redis/data:/data
- /etc/localtime:/etc/localtime:ro
command: redis-server --appendonly yes --requirepass ${PANEL_REDIS_ROOT_PASSWORD}
cap_drop:
- net_raw
sysctls:
net.core.somaxconn: "511"
labels:
createdBy: Apps
networks:
1panel-network:
external: true