diff --git a/garage-hq/2.0.0/data.yml b/garage-hq/2.0.0/data.yml new file mode 100644 index 000000000..df9ce99b8 --- /dev/null +++ b/garage-hq/2.0.0/data.yml @@ -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 diff --git a/garage-hq/2.0.0/docker-compose.yml b/garage-hq/2.0.0/docker-compose.yml new file mode 100644 index 000000000..e2030bb7a --- /dev/null +++ b/garage-hq/2.0.0/docker-compose.yml @@ -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 diff --git a/garage-hq/2.0.0/envs/default.env b/garage-hq/2.0.0/envs/default.env new file mode 100644 index 000000000..cd05f46e6 --- /dev/null +++ b/garage-hq/2.0.0/envs/default.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +ENV_FILE=.env diff --git a/garage-hq/2.0.0/envs/global.env b/garage-hq/2.0.0/envs/global.env new file mode 100644 index 000000000..e10989fe4 --- /dev/null +++ b/garage-hq/2.0.0/envs/global.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +TZ=Asia/Shanghai diff --git a/garage-hq/2.0.0/scripts/init.sh b/garage-hq/2.0.0/scripts/init.sh new file mode 100644 index 000000000..88bb39b37 --- /dev/null +++ b/garage-hq/2.0.0/scripts/init.sh @@ -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}" <> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/garage-hq/README.md b/garage-hq/README.md new file mode 100644 index 000000000..f349e340f --- /dev/null +++ b/garage-hq/README.md @@ -0,0 +1,15 @@ +# APP_NAME + +简短的介绍 + +![APP_NAME](https://file.lifebus.top/imgs/app_name_cover.png) + +![](https://img.shields.io/badge/%E6%96%B0%E7%96%86%E8%90%8C%E6%A3%AE%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E5%B7%A5%E4%BD%9C%E5%AE%A4-%E6%8F%90%E4%BE%9B%E6%8A%80%E6%9C%AF%E6%94%AF%E6%8C%81-blue) + +## 简介 + +XXXXXX + +--- + +![Ms Studio](https://file.lifebus.top/imgs/ms_blank_001.png) diff --git a/garage-hq/data.yml b/garage-hq/data.yml new file mode 100644 index 000000000..4561829f4 --- /dev/null +++ b/garage-hq/data.yml @@ -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/ diff --git a/garage-hq/logo.png b/garage-hq/logo.png new file mode 100644 index 000000000..2512e2b9c Binary files /dev/null and b/garage-hq/logo.png differ