feat: Add Forgejo

This commit is contained in:
xiwangly2 2025-02-18 14:10:21 +08:00
parent 2edc3b3e00
commit 9bfa2b7486
No known key found for this signature in database
GPG Key ID: BCA5053B087DFD22
7 changed files with 196 additions and 0 deletions

110
apps/forgejo/10/data.yml Normal file
View File

@ -0,0 +1,110 @@
additionalProperties:
formFields:
- default: mysql
envKey: PANEL_DB_TYPE
labelEn: Database Service
labelZh: 数据库服务
required: true
type: apps
child:
default: ""
envKey: PANEL_DB_HOST
required: true
type: service
values:
- label: MySQL
value: mysql
- label: PostgreSQL
value: postgres
label:
en: Database Service
ja: データベースサービス
ms: Perkhidmatan Pangkalan Data
pt-br: Serviço de Banco de Dados
ru: Сервис баз данных
ko: 데이터베이스 서비스
zh-hant: 資料庫服務
zh: 数据库服务
- default: forgejo
envKey: PANEL_DB_NAME
labelEn: Database
labelZh: 数据库名
random: true
required: true
rule: paramCommon
type: text
label:
en: Database
ja: データベース
ms: Pangkalan Data
pt-br: Banco de Dados
ru: База данных
ko: 데이터베이스
zh-hant: 資料庫
zh: 数据库
- default: forgejo
envKey: PANEL_DB_USER
random: true
required: true
rule: paramCommon
type: text
labelEn: Database User
labelZh: 数据库用户
label:
en: Database User
ja: データベースユーザー
ms: Pengguna Pangkalan Data
pt-br: Usuário do Banco de Dados
ru: Пользователь базы данных
ko: 데이터베이스 사용자
zh-hant: 資料庫用戶
zh: 数据库用户
- default: forgejo
envKey: PANEL_DB_USER_PASSWORD
random: true
required: true
rule: paramComplexity
type: password
labelEn: Database Password
labelZh: 数据库密码
label:
en: Database Password
ja: データベースのパスワード
ms: Kata Laluan Pangkalan Data
pt-br: Senha do Banco de Dados
ru: Пароль базы данных
ko: 데이터베이스 비밀번호
zh-hant: 資料庫密碼
zh: 数据库密码
- default: 3000
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: HTTP 端口
required: true
rule: paramPort
type: number
label:
en: HTTP Port
ja: HTTP ポート
ms: HTTP Port
pt-br: HTTP Porta
ru: HTTP Порт
ko: HTTP 포트
zh-Hant: HTTP 埠
zh: HTTP 端口
- default: 222
envKey: PANEL_APP_PORT_SSH
labelEn: Port
labelZh: SSH 端口
required: true
rule: paramPort
type: number
label:
en: SSH Port
ja: SSH ポート
ms: SSH Port
pt-br: SSH Porta
ru: SSH Порт
ko: SSH 포트
zh-Hant: SSH 埠
zh: SSH 端口

View File

@ -0,0 +1,27 @@
services:
forgejo:
image: codeberg.org/forgejo/forgejo:10
container_name: ${CONTAINER_NAME}
environment:
- USER_UID=1000
- USER_GID=1000
- forgejo__database__DB_TYPE=${PANEL_DB_TYPE}
- forgejo__database__HOST=${PANEL_DB_HOST}:${PANEL_DB_PORT}
- forgejo__database__NAME=${PANEL_DB_NAME}
- forgejo__database__USER=${PANEL_DB_USER}
- forgejo__database__PASSWD=${PANEL_DB_USER_PASSWORD}
restart: always
networks:
- 1panel-network
volumes:
- ./data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "${PANEL_APP_PORT_HTTP}:3000"
- "${PANEL_APP_PORT_SSH}:22"
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true

View File

@ -0,0 +1,11 @@
#!/bin/bash
if [[ -f ./.env ]]; then
if grep -q "PANEL_DB_TYPE" ./.env; then
echo "PANEL_DB_TYPE 已存在"
else
echo 'PANEL_DB_TYPE="mysql"' >> ./.env
fi
else
echo ".env 文件不存在"
fi

10
apps/forgejo/README.md Normal file
View File

@ -0,0 +1,10 @@
# Forgejo
**Forgejo** 是一个由社区驱动的开源代码协作平台,专注于为开发者提供安全、自主可控的代码托管与 DevOps 工具链。它基于 Gitea 分支发展而来,继承了轻量高效的特性,同时强化了对开放治理、隐私保护及可持续生态的支持,是自托管场景下的理想选择。
## 优势:
- **社区驱动**:完全由开源社区主导,开发透明且路线图开放,保障用户需求优先。
- **隐私至上**:支持私有化部署,赋予用户对数据的绝对控制权,满足企业级安全合规要求。
- **轻量高效**:基于 Go 语言构建,低资源消耗、高性能响应,适配从个人到团队的多规模场景。
- **开放治理**:通过去中心化协作模式推动发展,倡导代码自由与工具伦理,拒绝商业绑定。

10
apps/forgejo/README_en.md Normal file
View File

@ -0,0 +1,10 @@
# Forgejo
**Forgejo** is a community-driven open-source code collaboration platform, dedicated to providing developers with secure, self-controlled code hosting and DevOps toolchains. It is developed as a fork of Gitea, inheriting its lightweight and efficient characteristics while enhancing support for open governance, privacy protection, and sustainable ecosystems. It is an ideal choice for self-hosted scenarios.
## Advantages:
- **Community-Driven**: Fully led by the open-source community, with transparent development and an open roadmap, ensuring user needs are prioritized.
- **Privacy-First**: Supports private deployment, giving users absolute control over their data and meeting enterprise-level security and compliance requirements.
- **Lightweight and Efficient**: Built with Go, it features low resource consumption and high-performance responsiveness, suitable for scenarios ranging from individual use to team collaboration.
- **Open Governance**: Promotes development through a decentralized collaboration model, advocating for code freedom and tool ethics, and rejecting commercial lock-in.

28
apps/forgejo/data.yml Normal file
View File

@ -0,0 +1,28 @@
name: Forgejo
tags:
- DevOps
title: 新一代的代码托管平台
description: 新一代的代码托管平台
additionalProperties:
key: forgejo
name: Forgejo
tags:
- DevOps
shortDescZh: 新一代的代码托管平台
shortDescEn: The next generation of code hosting platform
description:
en: The next generation of code hosting platform
ja: 次世代のコードホスティングプラットフォーム
ms: Platform hosting kod generasi seterusnya
pt-br: A próxima geração de plataforma de hospedagem de código
ru: Платформа хостинга кода следующего поколения
ko: 다음 세대 코드 호스팅 플랫폼
zh-Hant: 下一代代碼託管平台
zh: 下一代代码托管平台
type: tool
crossVersionUpdate: true
limit: 0
recommend: 55
website: https://forgejo.org/
github: https://codeberg.org/forgejo/forgejo
document: https://forgejo.org/docs/

BIN
apps/forgejo/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB