diff --git a/apps/jumpserver/4.2.0/data.yml b/apps/jumpserver/4.2.0/data.yml index b7f253044..ab814f3a8 100644 --- a/apps/jumpserver/4.2.0/data.yml +++ b/apps/jumpserver/4.2.0/data.yml @@ -42,17 +42,6 @@ additionalProperties: value: "ERROR" - label: 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: default: "" envKey: PANEL_DB_HOST @@ -65,6 +54,8 @@ additionalProperties: required: true type: apps values: + - label: PostgreSQL + value: postgresql - label: MySQL value: mysql - label: MariaDB diff --git a/apps/jumpserver/4.2.0/docker-compose.yml b/apps/jumpserver/4.2.0/docker-compose.yml index e3d2c280a..ed55e1cd2 100644 --- a/apps/jumpserver/4.2.0/docker-compose.yml +++ b/apps/jumpserver/4.2.0/docker-compose.yml @@ -4,8 +4,13 @@ services: container_name: ${CONTAINER_NAME} privileged: true restart: always - labels: - createdBy: "Apps" + ports: + - ${PANEL_APP_PORT_HTTP}:80 + - ${SSH_PORT}:2222 + volumes: + - ./data/:/opt/data + networks: + - 1panel-network environment: SECRET_KEY: ${SECRET_KEY} BOOTSTRAP_TOKEN: ${BOOTSTRAP_TOKEN} @@ -21,13 +26,8 @@ services: REDIS_PORT: 6379 REDIS_PASSWORD: ${PANEL_REDIS_ROOT_PASSWORD} DOMAINS: ${DOMAINS:-} - ports: - - ${PANEL_APP_PORT_HTTP}:80 - - ${SSH_PORT}:2222 - volumes: - - ./data/:/opt/data - networks: - - 1panel-network + labels: + createdBy: "Apps" networks: 1panel-network: external: true \ No newline at end of file diff --git a/apps/jumpserver/4.2.0/scripts/init.sh b/apps/jumpserver/4.2.0/scripts/init.sh new file mode 100644 index 000000000..1d3a69b2f --- /dev/null +++ b/apps/jumpserver/4.2.0/scripts/init.sh @@ -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 \ No newline at end of file diff --git a/apps/jumpserver/README.md b/apps/jumpserver/README.md index 3f3fd4ceb..73803769c 100644 --- a/apps/jumpserver/README.md +++ b/apps/jumpserver/README.md @@ -1,9 +1,7 @@ # 默认账户密码 -``` -username:admin -password:admin -``` +用户名:`admin` +密码:v3 版本默认密码为 `admin`,v4 版本默认密码为 `ChangeMe` # JumpServer diff --git a/apps/jumpserver/data.yml b/apps/jumpserver/data.yml index 9494e672b..4515c63cc 100644 --- a/apps/jumpserver/data.yml +++ b/apps/jumpserver/data.yml @@ -11,7 +11,7 @@ additionalProperties: shortDescZh: 广受欢迎的开源堡垒机 shortDescEn: The world's first open-source Bastion Host type: tool - crossVersionUpdate: true + crossVersionUpdate: false limit: 1 recommend: 10 website: https://www.jumpserver.org diff --git a/renovate.json b/renovate.json index dd288a2c5..334978108 100644 --- a/renovate.json +++ b/renovate.json @@ -118,6 +118,14 @@ "matchFileNames": ["apps/postgresql/16.*/*.yml"], "allowedVersions": "/^16.*/" }, + { + "matchFileNames": ["apps/jumpserver/3.*/*.yml"], + "allowedVersions": "/^3.*/" + }, + { + "matchFileNames": ["apps/jumpserver/4.*/*.yml"], + "allowedVersions": "/^4.*/" + }, { "matchDatasources": ["docker"], "matchPackageNames": ["ghcr.io/umami-software/umami"],