feat: 优化 JumpServer v4 版本安装包

This commit is contained in:
wanghe-fit2cloud 2024-09-24 17:20:57 +08:00
parent a423ac7aaa
commit 9aa871f3f6
6 changed files with 47 additions and 25 deletions

View File

@ -42,17 +42,6 @@ additionalProperties:
value: "ERROR" value: "ERROR"
- label: CRITICAL - label: CRITICAL
value: "CRITICAL" value: "CRITICAL"
- default: postgresql
envKey: DB_ENGINE
labelEn: Database Engine
labelZh: 数据库引擎
required: true
type: select
values:
- label: PostgreSQL
value: postgresql
- label: MySQL
value: mysql
- child: - child:
default: "" default: ""
envKey: PANEL_DB_HOST envKey: PANEL_DB_HOST
@ -65,6 +54,8 @@ additionalProperties:
required: true required: true
type: apps type: apps
values: values:
- label: PostgreSQL
value: postgresql
- label: MySQL - label: MySQL
value: mysql value: mysql
- label: MariaDB - label: MariaDB

View File

@ -4,8 +4,13 @@ services:
container_name: ${CONTAINER_NAME} container_name: ${CONTAINER_NAME}
privileged: true privileged: true
restart: always restart: always
labels: ports:
createdBy: "Apps" - ${PANEL_APP_PORT_HTTP}:80
- ${SSH_PORT}:2222
volumes:
- ./data/:/opt/data
networks:
- 1panel-network
environment: environment:
SECRET_KEY: ${SECRET_KEY} SECRET_KEY: ${SECRET_KEY}
BOOTSTRAP_TOKEN: ${BOOTSTRAP_TOKEN} BOOTSTRAP_TOKEN: ${BOOTSTRAP_TOKEN}
@ -21,13 +26,8 @@ services:
REDIS_PORT: 6379 REDIS_PORT: 6379
REDIS_PASSWORD: ${PANEL_REDIS_ROOT_PASSWORD} REDIS_PASSWORD: ${PANEL_REDIS_ROOT_PASSWORD}
DOMAINS: ${DOMAINS:-} DOMAINS: ${DOMAINS:-}
ports: labels:
- ${PANEL_APP_PORT_HTTP}:80 createdBy: "Apps"
- ${SSH_PORT}:2222
volumes:
- ./data/:/opt/data
networks:
- 1panel-network
networks: networks:
1panel-network: 1panel-network:
external: true external: true

View File

@ -0,0 +1,25 @@
#!/bin/bash
ENV_FILE=".env"
if [ -f "$ENV_FILE" ]; then
PANEL_DB_TYPE=$(grep '^PANEL_DB_TYPE=' "$ENV_FILE" | cut -d '=' -f 2 | tr -d '"')
if [ "$PANEL_DB_TYPE" == "postgresql" ]; then
ENGINE="postgresql"
elif [ "$PANEL_DB_TYPE" == "mysql" ] || [ "$PANEL_DB_TYPE" == "mariadb" ]; then
ENGINE="mysql"
else
echo "Unsupported PANEL_DB_TYPE value: $PANEL_DB_TYPE"
exit 1
fi
if grep -q '^DB_ENGINE=' "$ENV_FILE"; then
sed -i.bak "s/^DB_ENGINE=.*/DB_ENGINE=$ENGINE/" "$ENV_FILE"
else
echo DB_ENGINE="$ENGINE" >> "$ENV_FILE"
fi
else
echo ".env file not found!"
exit 1
fi

View File

@ -1,9 +1,7 @@
# 默认账户密码 # 默认账户密码
``` 用户名:`admin`
usernameadmin 密码v3 版本默认密码为 `admin`v4 版本默认密码为 `ChangeMe`
passwordadmin
```
# JumpServer # JumpServer

View File

@ -11,7 +11,7 @@ additionalProperties:
shortDescZh: 广受欢迎的开源堡垒机 shortDescZh: 广受欢迎的开源堡垒机
shortDescEn: The world's first open-source Bastion Host shortDescEn: The world's first open-source Bastion Host
type: tool type: tool
crossVersionUpdate: true crossVersionUpdate: false
limit: 1 limit: 1
recommend: 10 recommend: 10
website: https://www.jumpserver.org website: https://www.jumpserver.org

View File

@ -118,6 +118,14 @@
"matchFileNames": ["apps/postgresql/16.*/*.yml"], "matchFileNames": ["apps/postgresql/16.*/*.yml"],
"allowedVersions": "/^16.*/" "allowedVersions": "/^16.*/"
}, },
{
"matchFileNames": ["apps/jumpserver/3.*/*.yml"],
"allowedVersions": "/^3.*/"
},
{
"matchFileNames": ["apps/jumpserver/4.*/*.yml"],
"allowedVersions": "/^4.*/"
},
{ {
"matchDatasources": ["docker"], "matchDatasources": ["docker"],
"matchPackageNames": ["ghcr.io/umami-software/umami"], "matchPackageNames": ["ghcr.io/umami-software/umami"],