feat: 应用商店支持 Gitea (#33)

* feat: 应用商店支持 Gitea
This commit is contained in:
wanghe 2023-04-27 14:12:19 +08:00 committed by GitHub
parent 31fedbff86
commit 53616d1e0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 196 additions and 195 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -0,0 +1,92 @@
## Purpose
The goal of this project is to make the easiest, fastest, and most
painless way of setting up a self-hosted Git service.
As Gitea is written in Go, it works across **all** the platforms and
architectures that are supported by Go, including Linux, macOS, and
Windows on x86, amd64, ARM and PowerPC architectures.
You can try it out using [the online demo](https://try.gitea.io/).
This project has been
[forked](https://blog.gitea.io/2016/12/welcome-to-gitea/) from
[Gogs](https://gogs.io) since November of 2016, but a lot has changed.
## Building
From the root of the source tree, run:
TAGS="bindata" make build
or if SQLite support is required:
TAGS="bindata sqlite sqlite_unlock_notify" make build
The `build` target is split into two sub-targets:
- `make backend` which requires [Go Stable](https://go.dev/dl/), required version is defined in [go.mod](/go.mod).
- `make frontend` which requires [Node.js LTS](https://nodejs.org/en/download/) or greater and Internet connectivity to download npm dependencies.
When building from the official source tarballs which include pre-built frontend files, the `frontend` target will not be triggered, making it possible to build without Node.js and Internet connectivity.
Parallelism (`make -j <num>`) is not supported.
More info: https://docs.gitea.io/en-us/install-from-source/
## Using
./gitea web
NOTE: If you're interested in using our APIs, we have experimental
support with [documentation](https://try.gitea.io/api/swagger).
## Contributing
Expected workflow is: Fork -> Patch -> Push -> Pull Request
NOTES:
1. **YOU MUST READ THE [CONTRIBUTORS GUIDE](CONTRIBUTING.md) BEFORE STARTING TO WORK ON A PULL REQUEST.**
2. If you have found a vulnerability in the project, please write privately to **security@gitea.io**. Thanks!
## Translating
Translations are done through Crowdin. If you want to translate to a new language ask one of the managers in the Crowdin project to add a new language there.
You can also just create an issue for adding a language or ask on discord on the #translation channel. If you need context or find some translation issues, you can leave a comment on the string or ask on Discord. For general translation questions there is a section in the docs. Currently a bit empty but we hope to fill it as questions pop up.
https://docs.gitea.io/en-us/translation-guidelines/
[![Crowdin](https://badges.crowdin.net/gitea/localized.svg)](https://crowdin.com/project/gitea)
## Further information
For more information and instructions about how to install Gitea, please look at our [documentation](https://docs.gitea.io/en-us/).
If you have questions that are not covered by the documentation, you can get in contact with us on our [Discord server](https://discord.gg/Gitea) or create a post in the [discourse forum](https://discourse.gitea.io/).
We maintain a list of Gitea-related projects at [gitea/awesome-gitea](https://gitea.com/gitea/awesome-gitea).
The Hugo-based documentation theme is hosted at [gitea/theme](https://gitea.com/gitea/theme).
The official Gitea CLI is developed at [gitea/tea](https://gitea.com/gitea/tea).
## Authors
- [Maintainers](https://github.com/orgs/go-gitea/people)
- [Contributors](https://github.com/go-gitea/gitea/graphs/contributors)
- [Translators](options/locale/TRANSLATORS)
## FAQ
**How do you pronounce Gitea?**
Gitea is pronounced [/ɡɪti:/](https://youtu.be/EM71-2uDAoY) as in "gi-tea" with a hard g.
**Why is this not hosted on a Gitea instance?**
We're [working on it](https://github.com/go-gitea/gitea/issues/1029).
## License
This project is licensed under the MIT License.
See the [LICENSE](https://github.com/go-gitea/gitea/blob/main/LICENSE) file
for the full license text.

View File

@ -0,0 +1,61 @@
{
"formFields": [
{
"type": "service",
"key": "mysql",
"labelZh": "数据库服务",
"labelEn": "Database Service",
"required": true,
"default": "",
"envKey": "PANEL_DB_HOST"
},
{
"type": "text",
"labelZh": "数据库名",
"labelEn": "Database",
"required": true,
"default": "gitea",
"random": true,
"rule": "paramCommon",
"envKey": "PANEL_DB_NAME"
},
{
"type": "text",
"labelZh": "数据库用户",
"labelEn": "User",
"required": true,
"default": "gitea",
"random": true,
"rule": "paramCommon",
"envKey": "PANEL_DB_USER"
},
{
"type": "password",
"labelZh": "数据库用户密码",
"labelEn": "Password",
"required": true,
"default": "gitea",
"random": true,
"rule": "paramComplexity",
"envKey": "PANEL_DB_USER_PASSWORD"
},
{
"type": "number",
"labelZh": "HTTP 端口",
"labelEn": "Port",
"required": true,
"default": 3000,
"rule": "paramPort",
"envKey": "GITEA_PORT_HTTP"
},
{
"type": "number",
"labelZh": "SSH 端口",
"labelEn": "Port",
"required": true,
"default": 222,
"rule": "paramPort",
"envKey": "GITEA_PORT_SSH"
}
]
}

View File

@ -0,0 +1,29 @@
version: "3"
services:
gitea:
image: gitea/gitea:1.19.1
container_name: ${CONTAINER_NAME}
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=mysql
- GITEA__database__HOST=${PANEL_DB_HOST}:3306
- GITEA__database__NAME=${PANEL_DB_NAME}
- GITEA__database__USER=${PANEL_DB_USER}
- GITEA__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:
- "${GITEA_PORT_HTTP}:3000"
- "${GITEA_PORT_SSH}:22"
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -1,126 +0,0 @@
# GitLab
## Canonical source
The canonical source of GitLab where all development takes place is [hosted on GitLab.com](https://gitlab.com/gitlab-org/gitlab).
If you wish to clone a copy of GitLab without proprietary code, you can use the read-only mirror of GitLab located at https://gitlab.com/gitlab-org/gitlab-foss/. However, please do not submit any issues and/or merge requests to that project.
## Free trial
You can request a free trial of GitLab Ultimate [on our website](https://about.gitlab.com/free-trial/).
## Open source software to collaborate on code
To see how GitLab looks please see the [features page on our website](https://about.gitlab.com/features/).
- Manage Git repositories with fine grained access controls that keep your code secure
- Perform code reviews and enhance collaboration with merge requests
- Complete continuous integration (CI) and continuous deployment/delivery (CD) pipelines to build, test, and deploy your applications
- Each project can also have an issue tracker, issue board, and a wiki
- Used by more than 100,000 organizations, GitLab is the most popular solution to manage Git repositories on-premises
- Completely free and open source (MIT Expat license)
## Editions
There are three editions of GitLab:
- GitLab Community Edition (CE) is available freely under the MIT Expat license.
- GitLab Enterprise Edition (EE) includes [extra features](https://about.gitlab.com/pricing/#compare-options) that are more useful for organizations with more than 100 users. To use EE and get official support please [become a subscriber](https://about.gitlab.com/pricing/).
- JiHu Edition (JH) tailored specifically for the [Chinese market](https://about.gitlab.cn/).
## Licensing
See the [LICENSE](LICENSE) file for licensing information as it pertains to
files in this repository.
## Hiring
We are hiring developers, support people, and production engineers all the time, please see our [jobs page](https://about.gitlab.com/jobs/).
## Website
On [about.gitlab.com](https://about.gitlab.com/) you can find more information about:
- [Subscriptions](https://about.gitlab.com/pricing/)
- [Consultancy](https://about.gitlab.com/consultancy/)
- [Community](https://about.gitlab.com/community/)
- [Hosted GitLab.com](https://about.gitlab.com/gitlab-com/) use GitLab as a free service
- [GitLab Enterprise Edition](https://about.gitlab.com/features/#enterprise) with additional features aimed at larger organizations.
- [GitLab CI](https://about.gitlab.com/gitlab-ci/) a continuous integration (CI) server that is easy to integrate with GitLab.
## Requirements
Please see the [requirements documentation](doc/install/requirements.md) for system requirements and more information about the supported operating systems.
## Installation
The recommended way to install GitLab is with the [Omnibus packages](https://about.gitlab.com/downloads/) on our package server.
Compared to an installation from source, this is faster and less error prone.
Just select your operating system, download the respective package (Debian or RPM) and install it using the system's package manager.
There are various other options to install GitLab, please refer to the [installation page on the GitLab website](https://about.gitlab.com/installation/) for more information.
## Contributing
GitLab is an open source project and we are very happy to accept community contributions. Please refer to [Contributing to GitLab page](https://about.gitlab.com/contributing/) for more details.
## Install a development environment
To work on GitLab itself, we recommend setting up your development environment with [the GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit).
If you do not use the GitLab Development Kit you need to install and configure all the dependencies yourself, this is a lot of work and error prone.
One small thing you also have to do when installing it yourself is to copy the example development Puma configuration file:
```shell
cp config/puma.example.development.rb config/puma.rb
```
Instructions on how to start GitLab and how to run the tests can be found in the [getting started section of the GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit#getting-started).
## Software stack
GitLab is a Ruby on Rails application that runs on the following software:
- Ubuntu/Debian/CentOS/RHEL/OpenSUSE
- Ruby (MRI) 2.7.7
- Git 2.33+
- Redis 5.0+
- PostgreSQL 12+
For more information please see the [architecture](https://docs.gitlab.com/ee/development/architecture.html) and [requirements](https://docs.gitlab.com/ee/install/requirements.html) documentation.
## UX design
Please adhere to the [UX Guide](https://design.gitlab.com/) when creating designs and implementing code.
## Third-party applications
There are a lot of [third-party applications integrating with GitLab](https://about.gitlab.com/applications/). These include GUI Git clients, mobile applications and API wrappers for various languages.
## GitLab release cycle
For more information about the release process see the [release documentation](https://gitlab.com/gitlab-org/release-tools/blob/master/README.md).
## Upgrading
For upgrading information please see our [update page](https://about.gitlab.com/update/).
## Documentation
All documentation can be found on <https://docs.gitlab.com>.
## Getting help
Please see [Getting help for GitLab](https://about.gitlab.com/getting-help/) on our website for the many options to get help.
## Why?
[Read here](https://about.gitlab.com/why/)
## Is it any good?
[Yes](https://about.gitlab.com/is-it-any-good/)
## Is it awesome?
[These people](https://twitter.com/gitlab/followers) seem to like it.

View File

@ -1,41 +0,0 @@
{
"formFields": [
{
"type": "text",
"labelZh": "域名或IP",
"labelEn": "Address",
"required": true,
"default": "",
"envKey": "GITLAB_HOSTNAME",
"placeholderZh": "请填写域名或者 IP 地址",
"placeholderEn": "Please fill in the domain name or IP address"
},
{
"type": "number",
"labelZh": "HTTP 端口",
"labelEn": "HTTP Port",
"required": true,
"default": 8090,
"rule": "paramPort",
"envKey": "PANEL_APP_PORT_HTTP"
},
{
"type": "number",
"labelZh": "HTTPS 端口",
"labelEn": "HTTPS Port",
"required": true,
"default": 8443,
"rule": "paramPort",
"envKey": "PANEL_APP_PORT_HTTPS"
},
{
"type": "number",
"labelZh": "SSH 端口",
"labelEn": "SSH Port",
"required": true,
"default": 2229,
"rule": "paramPort",
"envKey": "JENKINS_SSH_PORT"
}
]
}

View File

@ -1,28 +0,0 @@
version: '3'
services:
gitlab:
image: 'gitlab/gitlab-ce:15.8.3-ce.0'
container_name: ${CONTAINER_NAME}
restart: always
hostname: ${GITLAB_HOSTNAME}
environment:
TZ: 'Asia/Shanghai'
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://${GITLAB_HOSTNAME}:${PANEL_APP_PORT_HTTP}'
ports:
- ${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}
- ${PANEL_APP_PORT_HTTPS}:443
- ${JENKINS_SSH_PORT}:22
volumes:
- ./config:/etc/gitlab
- ./logs:/var/log/gitlab
- ./data:/var/opt/gitlab
shm_size: '256m'
networks:
- 1panel-network
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true

View File

@ -332,6 +332,20 @@
"website": "https://www.php.net/",
"github": "https://github.com/php/php-src",
"document": "https://www.php.net/docs.php"
},
{
"key": "gitea",
"name": "Gitea",
"tags": ["CI/CD"],
"versions": ["1.19.1"],
"shortDescZh": "一个自托管的 Git 服务",
"shortDescEn": "a self-hosted Git service",
"type": "tool",
"limit": 0,
"crossVersionUpdate": false,
"website": "https://gitea.io/",
"github": "https://github.com/go-gitea/gitea",
"document": "https://docs.gitea.io/"
}
]
}