mirror of
https://github.com/QYG2297248353/appstore-1panel.git
synced 2025-04-04 21:45:47 +08:00
发布 Stash Box
Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
parent
413362acfa
commit
38dbac0c20
@ -1,28 +1,26 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: "/home/stash"
|
||||
- child:
|
||||
default: ""
|
||||
envKey: PANEL_POSTGRES_SERVICE
|
||||
required: true
|
||||
type: service
|
||||
default: postgresql
|
||||
envKey: PANEL_POSTGRES_TYPE
|
||||
labelZh: Postgres 服务 (前置检查)
|
||||
labelEn: Postgres Service (Pre-check)
|
||||
required: true
|
||||
type: apps
|
||||
values:
|
||||
- label: PostgreSQL
|
||||
value: postgresql
|
||||
- default: "/home/stash-box"
|
||||
edit: true
|
||||
envKey: STASH_ROOT_PATH
|
||||
envKey: STASH_BOX_ROOT_PATH
|
||||
labelZh: 数据持久化路径
|
||||
labelEn: Data persistence path
|
||||
required: true
|
||||
type: text
|
||||
- default: "host"
|
||||
edit: true
|
||||
envKey: NETWORK_MODE
|
||||
labelEn: Drive path
|
||||
labelZh: 网络模式
|
||||
required: true
|
||||
type: select
|
||||
values:
|
||||
- label: 主机网络模式
|
||||
value: "host"
|
||||
- label: 桥接网络模式
|
||||
value: "bridge"
|
||||
- label: 无网络模式
|
||||
value: "none"
|
||||
- label: 1panel-network
|
||||
value: "1panel-network"
|
||||
- default: 9999
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
@ -31,27 +29,45 @@ additionalProperties:
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: ""
|
||||
- default: "127.0.0.1"
|
||||
edit: true
|
||||
envKey: CUSTOM_MOUNT_DIRECTORY_1
|
||||
labelEn: Custom mount directory 1
|
||||
labelZh: 自定义挂载目录 1
|
||||
required: false
|
||||
envKey: POSTGRES_HOST
|
||||
labelZh: 数据库 主机地址
|
||||
labelEn: Database Host
|
||||
required: true
|
||||
type: text
|
||||
- default: 5432
|
||||
edit: true
|
||||
envKey: POSTGRES_PORT
|
||||
labelZh: 数据库 端口
|
||||
labelEn: Database Port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: "stash-box"
|
||||
edit: true
|
||||
envKey: POSTGRES_NAME
|
||||
labelZh: 数据库 名称
|
||||
labelEn: Database Name
|
||||
required: true
|
||||
rule: paramCommon
|
||||
type: text
|
||||
- default: "stash-box"
|
||||
edit: true
|
||||
envKey: POSTGRES_USER
|
||||
labelZh: 数据库 用户名
|
||||
labelEn: Database Username
|
||||
required: true
|
||||
type: text
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: CUSTOM_MOUNT_DIRECTORY_2
|
||||
labelEn: Custom mount directory 2
|
||||
labelZh: 自定义挂载目录 2
|
||||
required: false
|
||||
type: text
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: CUSTOM_MOUNT_DIRECTORY_3
|
||||
labelEn: Custom mount directory 3
|
||||
labelZh: 自定义挂载目录 3
|
||||
required: false
|
||||
type: text
|
||||
envKey: POSTGRES_PASSWORD
|
||||
labelZh: 数据库 密码
|
||||
labelEn: Database Password
|
||||
random: true
|
||||
required: true
|
||||
rule: paramComplexity
|
||||
type: password
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: HTTP_PROXY
|
||||
|
@ -13,7 +13,8 @@ services:
|
||||
- traefik.http.routers.stash-box.tls.certresolver=stash-box
|
||||
- traefik.port=9998
|
||||
restart: always
|
||||
network_mode: ${NETWORK_MODE:-host}
|
||||
networks:
|
||||
- 1panel-network
|
||||
ports:
|
||||
- ${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}
|
||||
env_file:
|
||||
@ -25,4 +26,8 @@ services:
|
||||
max-file: "10"
|
||||
max-size: "2m"
|
||||
volumes:
|
||||
- ${STASH_ROOT_PATH}/data:/root/.stash-box
|
||||
- ${STASH_BOX_ROOT_PATH}/data:/root/.stash-box
|
||||
environment:
|
||||
- HTTPS_PROXY=${HTTP_PROXY}
|
||||
- HTTP_PROXY=${HTTP_PROXY:-}
|
||||
- NO_PROXY=${NO_PROXY:-}
|
||||
|
@ -10,6 +10,13 @@ if [ -f .env ]; then
|
||||
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
|
||||
|
||||
# setup-2 create stash-box-config.yml
|
||||
mkdir -p "$STASH_BOX_ROOT_PATH"
|
||||
mkdir -p "$STASH_BOX_ROOT_PATH/data"
|
||||
if [ ! -f "$STASH_BOX_ROOT_PATH/data/stash-box-config.yml" ]; then
|
||||
echo "database: ${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_NAME}" > "$STASH_BOX_ROOT_PATH/data/stash-box-config.yml"
|
||||
fi
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
|
@ -10,6 +10,13 @@ if [ -f .env ]; then
|
||||
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
|
||||
|
||||
# setup-2 create stash-box-config.yml
|
||||
mkdir -p "$STASH_BOX_ROOT_PATH"
|
||||
mkdir -p "$STASH_BOX_ROOT_PATH/data"
|
||||
if [ ! -f "$STASH_BOX_ROOT_PATH/data/stash-box-config.yml" ]; then
|
||||
echo "database: ${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_NAME}" > "$STASH_BOX_ROOT_PATH/data/stash-box-config.yml"
|
||||
fi
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user