1
0

Merge QYG2297248353/appstore-1panel into pooneyy/1Panel-Appstore

This commit is contained in:
pooneyy
2025-06-14 16:56:25 +08:00
1733 changed files with 48687 additions and 0 deletions

File diff suppressed because it is too large Load Diff

268
apps/gitea/1.24.0/data.yml Normal file
View File

@@ -0,0 +1,268 @@
additionalProperties:
formFields:
- child:
default: ""
envKey: PANEL_DB_HOST
required: true
type: service
default: postgresql
edit: true
envKey: PANEL_DB_TYPE
labelZh: 数据库 服务 (前置检查)
labelEn: Database Service (Pre-check)
required: true
type: apps
values:
- label: PostgreSQL
value: postgresql
- label: MySQL
value: mysql
- label: MariaDB
value: mariadb
- label: Percona
value: percona
- default: "/home/gitea"
edit: true
envKey: GITEA_ROOT_PATH
labelZh: 数据持久化路径
labelEn: Data persistence path
required: true
type: text
- default: 3000
envKey: PANEL_APP_PORT_HTTP
labelZh: WebUI 端口
labelEn: WebUI port
required: true
rule: paramPort
type: number
- default: 22
envKey: PANEL_APP_PORT_SSH
labelZh: SSH 端口
labelEn: SSH Port
required: true
rule: paramPort
type: number
- default: postgresql
edit: true
envKey: DB_TYPE
labelZh: 数据库 类型
labelEn: Database Type
required: true
type: select
values:
- label: PostgreSQL
value: postgresql
- label: MySQL (MariaDB, Percona)
value: mysql
- label: SQLite3 (忽略数据库配置)
value: sqlite3
- default: "127.0.0.1"
edit: true
envKey: DB_HOSTNAME
labelZh: 数据库 主机地址
labelEn: Database Host
required: false
type: text
- default: 5432
edit: true
envKey: DB_PORT
labelZh: 数据库 端口
labelEn: Database Port
required: false
rule: paramPort
type: number
- default: "gitea"
edit: true
envKey: DB_USER
labelZh: 数据库 用户名
labelEn: Database User
required: false
type: text
- default: ""
edit: true
envKey: DB_PASSWD
labelEn: Database Password
labelZh: 数据库 密码
random: true
required: false
rule: paramComplexity
type: password
- default: "gitea"
edit: true
envKey: DB_NAME
labelZh: 数据库 名称
labelEn: Database Name
required: false
type: text
- default: "Gitea"
edit: true
envKey: APP_NAME
labelZh: 应用名称
labelEn: Application Name
required: true
type: text
- default: "localhost"
edit: true
envKey: DOMAIN
labelZh: HTTP 克隆域名
labelEn: HTTP Clone Domain
required: true
type: text
- default: "localhost"
edit: true
envKey: SSH_DOMAIN
labelZh: SSH 克隆域名
labelEn: SSH Clone Domain
required: true
type: text
- default: 22
edit: true
envKey: SSH_PORT
labelZh: SSH 克隆显示端口
labelEn: SSH Clone Display Port
required: true
rule: paramPort
type: number
- default: ""
edit: true
envKey: ROOT_URL
labelZh: 公共 URL (覆盖级)
labelEn: Public URL (Override)
required: false
rule: paramExtUrl
type: text
- default: "false"
edit: true
envKey: LFS_START_SERVER
labelZh: 启用 Git LFS 支持
labelEn: Enable Git LFS Support
required: true
type: select
values:
- label: 开启
value: "true"
- label: 关闭
value: "false"
- default: "false"
edit: true
envKey: DISABLE_REGISTRATION
labelZh: 禁用注册
labelEn: Disable Registration
required: true
type: select
values:
- label: 开启
value: "true"
- label: 关闭
value: "false"
- default: "false"
edit: true
envKey: REQUIRE_SIGNIN_VIEW
labelZh: 强制登录
labelEn: Require Signin
required: true
type: select
values:
- label: 开启
value: "true"
- label: 关闭
value: "false"
- default: "false"
edit: true
envKey: INSTALL_LOCK
labelZh: 禁止访问安装页面
labelEn: Disable Access to Install Page
required: true
type: select
values:
- label: 开启
value: "true"
- label: 关闭
value: "false"
- default: ""
edit: true
envKey: SECRET_KEY
labelZh: 全局加密密钥
labelEn: Global Secret Key
required: false
type: text
- default: "false"
edit: true
envKey: PROXY_ENABLED
labelZh: 启用代理 (全局 + Webhook)
labelEn: Enable Proxy (Global + Webhook)
required: true
type: select
values:
- label: 开启
value: "true"
- label: 关闭
value: "false"
- default: ""
edit: true
envKey: PROXY_URL
labelZh: 代理服务器地址 (全局 + Webhook)
labelEn: Proxy Server URL (Global + Webhook)
required: false
type: text
- default: "**"
edit: true
envKey: PROXY_HOSTS
labelZh: 代理网址 (全局 + Webhook)
labelEn: Proxy Hosts (Global + Webhook)
required: false
type: text
- default: "false"
edit: true
envKey: MAILER_ENABLED
labelZh: 启用邮件服务
labelEn: Enable Mailer Service
required: true
type: select
values:
- label: 开启
value: "true"
- label: 关闭
value: "false"
- default: ""
edit: true
envKey: MAILER_SMTP_ADDR
labelZh: 邮件服务器地址
labelEn: Mailer Server Address
required: false
type: text
- default: 465
edit: true
envKey: MAILER_SMTP_PORT
labelZh: 邮件服务器端口
labelEn: Mailer Server Port
required: false
type: number
- default: ""
edit: true
envKey: MAILER_USER
labelZh: 邮件服务用户名
labelEn: Mailer Username
required: false
type: text
- default: ""
edit: true
envKey: MAILER_PASSWD
labelZh: 邮件服务密码
labelEn: Mailer Password
required: false
type: text
- default: ""
edit: true
envKey: MAILER_FROM
labelZh: 邮件服务发件人
labelEn: Mailer From
required: false
type: text
- default: "[Gitea]"
edit: true
envKey: MAILER_SUBJECT_PREFIX
labelZh: 邮件服务主题前缀
labelEn: Mailer Subject Prefix
required: false
type: text

View File

@@ -0,0 +1,44 @@
networks:
1panel-network:
external: true
services:
gitea:
image: gitea/gitea:1.24.0
container_name: ${CONTAINER_NAME}
labels:
createdBy: "Apps"
restart: always
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:3000
- ${PANEL_APP_PORT_SSH}:22
env_file:
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
- ${APP_ENV_FILE:-/etc/1panel/envs/gitea/gitea.env}
- ${ENV_FILE:-/etc/1panel/envs/default.env}
volumes:
- ${GITEA_ROOT_PATH}/data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- USER_UID=1000
- USER_GID=1000
- DISABLE_SSH=false
- GITEA__api__ENABLE_SWAGGER=false
- DB_HOST=${DB_HOSTNAME}:${DB_PORT}
- GITEA__mailer__ENABLED=${MAILER_ENABLED}
- GITEA__mailer__SMTP_ADDR=${MAILER_SMTP_ADDR}
- GITEA__mailer__SMTP_PORT=${MAILER_SMTP_PORT}
- GITEA__mailer__USER=${MAILER_USER}
- GITEA__mailer__PASSWD=${MAILER_PASSWD}
- GITEA__mailer__FROM=${MAILER_FROM}
- GITEA__mailer__SUBJECT_PREFIX=${MAILER_SUBJECT_PREFIX}
- GITEA__proxy__PROXY_ENABLED=${PROXY_ENABLED}
- GITEA__proxy__PROXY_URL=${PROXY_URL}
- GITEA__proxy__PROXY_HOSTS=${PROXY_HOSTS}
- GITEA__webhook__PROXY_URL=${PROXY_URL}
- GITEA__webhook__PROXY_HOSTS=${PROXY_HOSTS}
- GITEA__git.config__http.proxy=${PROXY_URL}
- GITEA__git.config__https.proxy=${PROXY_URL}

View File

@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
ENV_FILE=.env

View File

@@ -0,0 +1,36 @@
USER_UID=1000
USER_GID=1000
APP_NAME="Gitea"
RUN_MODE=prod
DOMAIN=localhost
SSH_DOMAIN=localhost
SSH_PORT=22
SSH_LISTEN_PORT=22
DISABLE_SSH=false
HTTP_PORT=3000
ROOT_URL=""
LFS_START_SERVER=true
DB_TYPE=sqlite3
DB_HOST=""
DB_NAME=""
DB_USER=""
DB_PASSWD=""
INSTALL_LOCK=false
SECRET_KEY=""
DISABLE_REGISTRATION=false
REQUIRE_SIGNIN_VIEW=false
GITEA__time__DEFAULT_UI_LOCATION=Asia/Shanghai
GITEA__migrations__ALLOW_LOCALNETWORKS=true
GITEA__api__ENABLE_SWAGGER=false
GITEA__ui.meta__AUTHOR=新疆萌森软件开发工作室
GITEA__ui.meta__DESCRIPTION=轻量级代码托管解决方案,支持自建和托管服务。
GITEA__ui.meta__KEYWORDS=git,gitea,github,gitlab,gitee,code
GITEA__security__LOGIN_REMEMBER_DAYS=3
GITEA__server__LOCAL_ROOT_URL=http://localhost:3000/
GITEA__webhook__ALLOWED_HOST_LIST=*
GITEA__picture__REPOSITORY_AVATAR_FALLBACK=random
GITEA__attachment__MAX_SIZE=1024
GITEA__git__MAX_GIT_DIFF_LINES=10000
GITEA__git.config__http.postBuffer=2147483648
GITEA__git.config__core.compression=0
GITEA__other__SHOW_FOOTER_POWERED_BY=false

View File

@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
TZ=Asia/Shanghai

View File

@@ -0,0 +1,19 @@
#!/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
sed -i '/^APP_ENV_FILE=/d' .env
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
echo "APP_ENV_FILE=${CURRENT_DIR}/envs/gitea.env" >> .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi

View File

@@ -0,0 +1,10 @@
#!/bin/bash
if [ -f .env ]; then
source .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi

View File

@@ -0,0 +1,19 @@
#!/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
sed -i '/^APP_ENV_FILE=/d' .env
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
echo "APP_ENV_FILE=${CURRENT_DIR}/envs/gitea.env" >> .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi

152
apps/gitea/README.md Normal file
View File

@@ -0,0 +1,152 @@
# Gitea
Gitea 是一个轻量级的 DevOps 平台软件。
![Gitea](https://file.lifebus.top/imgs/gitea_cover_show.png)
Gitea 是一个轻量级的 DevOps 平台软件。从开发计划到产品成型的整个软件生命周期,他都能够高效而轻松的帮助团队和开发者。包括
Git 托管、代码审查、团队协作、软件包注册和 CI/CD。它与 GitHub、Bitbucket 和 GitLab 等比较类似。 Gitea 最初是从 Gogs
分支而来,几乎所有代码都已更改。
![](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)
## 特性
+ 代码托管
Gitea⽀持创建和管理仓库、浏览提交历史和代码⽂件、审查和合并代码提交、管理协作者、管理分⽀等。它还⽀持许多常见的Git特性⽐如标签、Cherry-pick、hook、集成协作⼯具等。
+ 轻量级和快速
Gitea 的设计目标之一就是轻量级和快速响应。它不像一些大型的代码托管平台那样臃肿因此在性能方面表现出色适用于资源有限的服务器环境。由于其轻量级设计Gitea
在资源消耗方面相对较低,可以在资源有限的环境下运行良好。
+ 易于部署和维护
轻松地部署在各种服务器上,不需要复杂的配置和依赖。这使得个人开发者或小团队可以方便地设置和管理自己的 Git 服务。
+ 安全性
Gitea 注重安全性,提供了用户权限管理、访问控制列表等功能,可以确保代码和数据的安全性。
+ 代码评审
代码评审同时支持 Pull Request workflow 和 AGit workflow。评审⼈可以在线浏览代码并提交评审意见或问题。 提交者可以接收到评审意见,并在线回
复或修改代码。代码评审可以帮助用户和企业提⾼代码质量。
+ CI/CD
Gitea Actions⽀持 CI/CD 功能,该功能兼容 GitHub Actions⽤⼾可以采用熟悉的YAML格式编写workflows也可以重⽤⼤量的已有的 Actions
插件。Actions 插件支持从任意的 Git 网站中下载。
项目管理Gitea 通过看板和⼯单来跟踪⼀个项⽬的需求功能和bug。⼯单⽀持分支标签、⾥程碑、 指派、时间跟踪、到期时间、依赖关系等功能。
+ 制品库
Gitea支持超过 20 种不同种类的公有或私有软件包管理包括Cargo, Chef, Composer, Conan, Conda, Container, Helm, Maven, npm,
NuGet, Pub, PyPI, RubyGems, Vagrant等
+ 开源社区支持
Gitea 是一个基于 MIT 许可证的开源项目,Gitea 拥有一个活跃的开源社区,能够持续地进行开发和改进,同时也积极接受社区贡献,保持了平台的更新和创新。
+ 多语言支持
Gitea 提供多种语言界面,适应全球范围内的用户,促进了国际化和本地化。
## 安装说明
### 代理配置
开启 `启用代理` 配置后,同时生效与 `Gitea` 服务和 `Webhook` 服务和 `Git` 服务
+ `代理服务器地址` 填写代理服务器地址
代理服务器支持协议:`http://` `https://` `socks://`
+ `代理网址` 代理匹配规则
支持使用 `*` 匹配符号
使用 `**` 代表所有网址
例如需要代理: `Github` `gitlab`, 此项配置不作用于 `Git` 服务
```text
github.com,*.github.com,*.gitlab.com
```
在 app.ini 配置文件中配置如下:
```ini
[webhook]
PROXY_URL = http://{host}:{port}
PROXY_HOSTS = github.com,*.github.com,*.gitlab.com
[proxy]
PROXY_ENABLED = true
PROXY_URL = http://{host}:{port}
PROXY_HOSTS = github.com,*.github.com,*.gitlab.com
```
### 开启 API 文档
默认关闭 `Swagger` 文档,开启后可以查看 `API` 文档
首次安装前,编辑`docker-compose.yml`修改环境变量 `GITEA__api__ENABLE_SWAGGER=false``true` 即可开启文档服务。
已安装用户,修改配置文件 `data/gitea/conf/app.ini``API` 配置项 `ENABLE_SWAGGER``true` 即可开启文档服务。
```ini
[api]
ENABLE_SWAGGER = true
```
## 反向代理
> Nginx
```nginx
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
```
## 常见问题
> 安装后,修改配置文件后,重启服务,但是配置文件没有生效?
安装后如需修改配置,请修改 持久化目录 下的 `data/gitea/conf/app.ini` 文件,然后重启服务。
> 迁移 大仓库时,提示 `fatal: early EOF`
请修改 `data/gitea/home/.gitconfig` 文件,然后重启服务。
```gitconfig
[http]
version = HTTP/1.1
lowSpeedLimit = 0
lowSpeedTime = 999999
postbuffer = 2147483648
[core]
compression = 0
```
配置说明:
+ 使用 HTTP/1.1 协议 `http.version = HTTP/1.1`
+ 限制速度 `http.lowSpeedLimit = 0`
+ 限制时间 `http.lowSpeedTime = 999999`
+ 提交缓冲区大小 `http.postbuffer = 2147483648`
+ 关闭压缩 `core.compression = 0`
---
![Ms Studio](https://file.lifebus.top/imgs/ms_blank_001.png)

16
apps/gitea/data.yml Normal file
View File

@@ -0,0 +1,16 @@
additionalProperties:
key: gitea
name: Gitea
tags:
- WebSite
- DevOps
- Storage
- Local
shortDescZh: 新一代的代码托管平台
shortDescEn: The next generation of code hosting platform
type: website
crossVersionUpdate: true
limit: 0
website: https://gitea.io/
github: https://github.com/go-gitea/gitea/
document: https://docs.gitea.io/

BIN
apps/gitea/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB