mirror of
https://github.com/pooneyy/1Panel-Appstore.git
synced 2026-03-19 17:21:03 +08:00
发布应用 Garage HQ
Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
parent
d9da4c54e7
commit
bb1f02b82d
41
garage-hq/2.0.0/data.yml
Normal file
41
garage-hq/2.0.0/data.yml
Normal file
@ -0,0 +1,41 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: "/home/garage"
|
||||
edit: true
|
||||
envKey: GARAGE_ROOT_PATH
|
||||
labelZh: 数据持久化路径
|
||||
labelEn: Data persistence path
|
||||
required: true
|
||||
type: text
|
||||
- default: 3902
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelZh: WebUI 端口
|
||||
labelEn: WebUI port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 3900
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_S3_API
|
||||
labelZh: S3 API 接口
|
||||
labelEn: S3 API
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 3901
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_RPC
|
||||
labelZh: RPC 通信
|
||||
labelEn: RPC Communication
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 3903
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_API
|
||||
labelZh: 管理 API
|
||||
labelEn: Manage API
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
27
garage-hq/2.0.0/docker-compose.yml
Normal file
27
garage-hq/2.0.0/docker-compose.yml
Normal file
@ -0,0 +1,27 @@
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
|
||||
services:
|
||||
garage:
|
||||
image: dxflrs/garage:v2.0.0
|
||||
container_name: ${CONTAINER_NAME}
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
restart: always
|
||||
networks:
|
||||
- 1panel-network
|
||||
ports:
|
||||
- ${PANEL_APP_PORT_S3_API}:3900
|
||||
- ${PANEL_APP_PORT_RPC}:3901
|
||||
- ${PANEL_APP_PORT_HTTP}:3902
|
||||
- ${PANEL_APP_PORT_API}:3903
|
||||
env_file:
|
||||
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
|
||||
- ${ENV_FILE:-/etc/1panel/envs/default.env}
|
||||
volumes:
|
||||
- ${GARAGE_ROOT_PATH}/config/garage.toml:/etc/garage.toml
|
||||
- ${GARAGE_ROOT_PATH}/meta:/var/lib/garage/meta
|
||||
- ${GARAGE_ROOT_PATH}/data:/var/lib/garage/data
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
2
garage-hq/2.0.0/envs/default.env
Normal file
2
garage-hq/2.0.0/envs/default.env
Normal file
@ -0,0 +1,2 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
ENV_FILE=.env
|
||||
2
garage-hq/2.0.0/envs/global.env
Normal file
2
garage-hq/2.0.0/envs/global.env
Normal file
@ -0,0 +1,2 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
TZ=Asia/Shanghai
|
||||
68
garage-hq/2.0.0/scripts/init.sh
Normal file
68
garage-hq/2.0.0/scripts/init.sh
Normal file
@ -0,0 +1,68 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
# setup-1 add default values
|
||||
CURRENT_DIR=$(pwd)
|
||||
sed -i '/^ENV_FILE=/d' .env
|
||||
sed -i '/^GLOBAL_ENV_FILE=/d' .env
|
||||
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
|
||||
|
||||
# 检查 GARAGE_ROOT_PATH 是否存在
|
||||
if [ -z "${GARAGE_ROOT_PATH}" ]; then
|
||||
echo "Error: GARAGE_ROOT_PATH is not set in .env."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 创建 config 目录
|
||||
CONFIG_DIR="${GARAGE_ROOT_PATH}/config"
|
||||
mkdir -p "${CONFIG_DIR}"
|
||||
CONFIG_FILE="${CONFIG_DIR}/garage.toml"
|
||||
|
||||
# 检查文件是否存在并包含 admin_token
|
||||
if [ -f "${CONFIG_FILE}" ] && grep -q '^admin_token' "${CONFIG_FILE}"; then
|
||||
echo "garage.toml already exists and contains admin_token. Skipping creation."
|
||||
else
|
||||
echo "Creating or updating garage.toml..."
|
||||
|
||||
cat > "${CONFIG_FILE}" <<EOF
|
||||
metadata_dir = "/tmp/meta"
|
||||
data_dir = "/tmp/data"
|
||||
db_engine = "sqlite"
|
||||
|
||||
replication_factor = 1
|
||||
|
||||
rpc_bind_addr = "[::]:3901"
|
||||
rpc_public_addr = "127.0.0.1:3901"
|
||||
rpc_secret = "$(openssl rand -hex 32)"
|
||||
|
||||
[s3_api]
|
||||
s3_region = "garage"
|
||||
api_bind_addr = "[::]:3900"
|
||||
root_domain = ".s3.garage.localhost"
|
||||
|
||||
[s3_web]
|
||||
bind_addr = "[::]:3902"
|
||||
root_domain = ".web.garage.localhost"
|
||||
index = "index.html"
|
||||
|
||||
[k2v_api]
|
||||
api_bind_addr = "[::]:3904"
|
||||
|
||||
[admin]
|
||||
api_bind_addr = "[::]:3903"
|
||||
admin_token = "$(openssl rand -base64 32)"
|
||||
metrics_token = "$(openssl rand -base64 32)"
|
||||
EOF
|
||||
|
||||
echo "garage.toml written to ${CONFIG_FILE}"
|
||||
fi
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
exit 1
|
||||
fi
|
||||
10
garage-hq/2.0.0/scripts/uninstall.sh
Normal file
10
garage-hq/2.0.0/scripts/uninstall.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
17
garage-hq/2.0.0/scripts/upgrade.sh
Normal file
17
garage-hq/2.0.0/scripts/upgrade.sh
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
# setup-1 add default values
|
||||
CURRENT_DIR=$(pwd)
|
||||
sed -i '/^ENV_FILE=/d' .env
|
||||
sed -i '/^GLOBAL_ENV_FILE=/d' .env
|
||||
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
15
garage-hq/README.md
Normal file
15
garage-hq/README.md
Normal file
@ -0,0 +1,15 @@
|
||||
# APP_NAME
|
||||
|
||||
简短的介绍
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 简介
|
||||
|
||||
XXXXXX
|
||||
|
||||
---
|
||||
|
||||

|
||||
14
garage-hq/data.yml
Normal file
14
garage-hq/data.yml
Normal file
@ -0,0 +1,14 @@
|
||||
additionalProperties:
|
||||
key: garage-hq
|
||||
name: Garage HQ
|
||||
tags:
|
||||
- WebSite
|
||||
- Local
|
||||
shortDescZh: 专为自托管而定制的开源分布式对象存储服务
|
||||
shortDescEn: An open-source distributed object storage service tailored for self-hosting
|
||||
type: website
|
||||
crossVersionUpdate: true
|
||||
limit: 0
|
||||
website: https://garagehq.deuxfleurs.fr/
|
||||
github: https://git.deuxfleurs.fr/Deuxfleurs/garage/
|
||||
document: https://garagehq.deuxfleurs.fr/
|
||||
BIN
garage-hq/logo.png
Normal file
BIN
garage-hq/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Loading…
x
Reference in New Issue
Block a user