Compare commits
4 Commits
feature/ap
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3567148061 | ||
|
|
adcddd551e | ||
|
|
63fb8120c9 | ||
|
|
641a76b773 |
208
README.md
@@ -1,47 +1,29 @@
|
|||||||
# DevStar
|
# DevStar
|
||||||
|
|
||||||
[](https://github.com/mengning/DevStar/actions/workflows/release-nightly.yml?query=branch%3Amain "Release Nightly")
|
The Last Mile of Al for R&D
|
||||||
[](https://discord.gg/Gitea "Join the Discord chat at https://discord.gg/Gitea")
|
|
||||||
[](https://goreportcard.com/report/code.gitea.io/gitea "Go Report Card")
|
|
||||||
[](https://pkg.go.dev/code.gitea.io/gitea "GoDoc")
|
|
||||||
[](https://github.com/mengning/DevStar/releases/latest "GitHub release")
|
|
||||||
[](https://www.codetriage.com/go-gitea/gitea "Help Contribute to Open Source")
|
|
||||||
[](https://opencollective.com/gitea "Become a backer/sponsor of gitea")
|
|
||||||
[](https://opensource.org/licenses/MIT "License: MIT")
|
|
||||||
[](https://gitpod.io/#https://github.com/mengning/DevStar)
|
|
||||||
[](https://translate.gitea.com "Crowdin")
|
|
||||||
|
|
||||||
[繁體中文](./README.zh-tw.md) | [简体中文](./README.zh-cn.md)
|
|
||||||
|
|
||||||
## Purpose
|
## Purpose
|
||||||
|
|
||||||
The goal of this project is to make the easiest, fastest, and most
|
DevStar Studio是为AI时代打造的新一代一站式智能研发平台,面向人类开发者和AI开发者的融合团队,专注于产品质量和团队效能,为研发部门赋能提效。
|
||||||
painless way of setting up a self-hosted Git service.
|
|
||||||
|
|
||||||
As Gitea is written in Go, it works across **all** the platforms and
|
As [Gitea](https://github.com/go-gitea/gitea) is written in Go, it works across **all** the platforms and
|
||||||
architectures that are supported by Go, including Linux, macOS, and
|
architectures that are supported by Go, including Linux, macOS, and
|
||||||
Windows on x86, amd64, ARM and PowerPC architectures.
|
Windows on x86, amd64, ARM and PowerPC architectures.
|
||||||
This project has been
|
This project has been
|
||||||
[forked](https://blog.gitea.com/welcome-to-gitea/) from
|
[forked](https://blog.gitea.com/welcome-to-gitea/) from
|
||||||
[Gogs](https://gogs.io) since November of 2016, but a lot has changed.
|
[Gogs](https://gogs.io) since November of 2016, but a lot has changed.
|
||||||
|
|
||||||
For online demonstrations, you can visit [DevStar.cn](https://DevStar.cn).
|
* For online demonstrations, you can visit [DevStar.cn](https://DevStar.cn).
|
||||||
|
* You can find comprehensive documentation on our official [documentation website](https://mengning.com.cn/src/devstar/).
|
||||||
For accessing free Gitea service (with a limited number of repositories), you can visit [gitea.com](https://gitea.com/user/login).
|
* If you have any suggestions or would like to contribute to it, you can visit [devstar/docs](/docs) and the [documentation repository](https://devstar.cn/devstar/docs)
|
||||||
|
|
||||||
To quickly deploy your own dedicated Gitea instance on Gitea Cloud, you can start a free trial at [cloud.gitea.com](https://cloud.gitea.com).
|
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
You can find comprehensive documentation on our official [documentation website](https://docs.gitea.com/).
|
|
||||||
|
|
||||||
It includes installation, administration, usage, development, contributing guides, and more to help you get started and explore all features effectively.
|
|
||||||
|
|
||||||
If you have any suggestions or would like to contribute to it, you can visit the [documentation repository](https://gitea.com/gitea/docs)
|
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
From the root of the source tree, run:
|
Build devstar-studio:latest From the root of the source tree, run::
|
||||||
|
```
|
||||||
|
make devstar
|
||||||
|
```
|
||||||
|
or Build a binary file named `gitea` From the root of the source tree, run:
|
||||||
|
|
||||||
TAGS="bindata" make build
|
TAGS="bindata" make build
|
||||||
|
|
||||||
@@ -60,18 +42,10 @@ More info: https://docs.gitea.com/installation/install-from-source
|
|||||||
|
|
||||||
## Using
|
## Using
|
||||||
|
|
||||||
After building, a binary file named `gitea` will be generated in the root of the source tree by default. To run it, use:
|
Build and Start from Container Image:
|
||||||
|
|
||||||
./gitea web
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> devcontainer相关功能不能在localhost域名下正常工作,调试环境请在custom/conf/app.ini中修改为IP地址
|
|
||||||
> If you're interested in using our APIs, we have experimental support with [documentation](https://docs.gitea.com/api).
|
|
||||||
|
|
||||||
Start from Container Image:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
make devstar
|
make devstar # Build devstar-studio:latest
|
||||||
public/assets/install.sh start --image=devstar-studio:latest
|
public/assets/install.sh start --image=devstar-studio:latest
|
||||||
|
|
||||||
# 查看日志
|
# 查看日志
|
||||||
@@ -82,6 +56,13 @@ public/assets/install.sh clean
|
|||||||
sudo docker stop $(docker ps -aq) && sudo docker rm -f $(docker ps -aq)
|
sudo docker stop $(docker ps -aq) && sudo docker rm -f $(docker ps -aq)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
or, After building, a binary file named `gitea` will be generated in the root of the source tree by default. To run it, use:
|
||||||
|
|
||||||
|
./gitea web
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> devcontainer相关功能不能在localhost域名下正常工作,调试环境请在custom/conf/app.ini中修改为IP地址
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Expected workflow is: Fork -> Patch -> Push -> Pull Request
|
Expected workflow is: Fork -> Patch -> Push -> Pull Request
|
||||||
@@ -112,7 +93,7 @@ npm -v # should print `10.9.0`
|
|||||||
|
|
||||||
在DevStar Git仓库创建分支
|
在DevStar Git仓库创建分支
|
||||||
```
|
```
|
||||||
git clone https://gitee.com/devstar/devstar.git
|
git clone https://devstar.cn/devstar/devstar.git
|
||||||
git checkout -b YOUR_BRANCH
|
git checkout -b YOUR_BRANCH
|
||||||
code devstar
|
code devstar
|
||||||
|
|
||||||
@@ -122,6 +103,10 @@ make test # testing
|
|||||||
TAGS="bindata timetzdata sqlite sqlite_unlock_notify" make build # 生成可执行文件
|
TAGS="bindata timetzdata sqlite sqlite_unlock_notify" make build # 生成可执行文件
|
||||||
./gitea
|
./gitea
|
||||||
|
|
||||||
|
# 镜像方式安装验证
|
||||||
|
make devstar # Build devstar-studio:latest
|
||||||
|
public/assets/install.sh start --image=devstar-studio:latest
|
||||||
|
|
||||||
# 提交代码
|
# 提交代码
|
||||||
git add FILES
|
git add FILES
|
||||||
git commit -m "commit log"
|
git commit -m "commit log"
|
||||||
@@ -137,140 +122,29 @@ public/assets/install.sh start
|
|||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
>
|
>
|
||||||
> 1. **YOU MUST READ THE [CONTRIBUTORS GUIDE](CONTRIBUTING.md) BEFORE STARTING TO WORK ON A PULL REQUEST.**
|
> 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!
|
> 2. If you have found a vulnerability in the project, please write privately to **contact@mengning.com.cn**. Thanks!
|
||||||
|
|
||||||
## Translating
|
|
||||||
|
|
||||||
[](https://translate.gitea.com)
|
|
||||||
|
|
||||||
Translations are done through [Crowdin](https://translate.gitea.com). 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.
|
|
||||||
|
|
||||||
Get more information from [documentation](https://docs.gitea.com/contributing/localization).
|
|
||||||
|
|
||||||
## Official and Third-Party Projects
|
## Official and Third-Party Projects
|
||||||
|
|
||||||
We provide an official [go-sdk](https://gitea.com/gitea/go-sdk), a CLI tool called [tea](https://gitea.com/gitea/tea) and an [action runner](https://gitea.com/gitea/act_runner) for Gitea Action.
|
* [webTerminal](https://devstar.cn/devstar/webTerminal) for DevStar devcontainer
|
||||||
|
* [devstar-vscode](https://devstar.cn/devstar/devstar-vscode)
|
||||||
|
* [action runner](https://devstar.cn/devstar/act_runner) for DevStar Action
|
||||||
|
* [go-sdk](https://gitea.com/gitea/go-sdk)
|
||||||
|
* a CLI tool called [tea](https://gitea.com/gitea/tea)
|
||||||
|
|
||||||
We maintain a list of Gitea-related projects at [gitea/awesome-gitea](https://gitea.com/gitea/awesome-gitea), where you can discover more third-party projects, including SDKs, plugins, themes, and more.
|
We maintain a list of Gitea-related projects at [gitea/awesome-gitea](https://gitea.com/gitea/awesome-gitea), where you can discover more third-party projects, including SDKs, plugins, themes, and more.
|
||||||
|
|
||||||
## Communication
|
|
||||||
|
|
||||||
[](https://discord.gg/Gitea "Join the Discord chat at https://discord.gg/Gitea")
|
|
||||||
|
|
||||||
If you have questions that are not covered by the [documentation](https://docs.gitea.com/), you can get in contact with us on our [Discord server](https://discord.gg/Gitea) or create a post in the [discourse forum](https://forum.gitea.com/).
|
|
||||||
|
|
||||||
## Authors
|
|
||||||
|
|
||||||
- [Maintainers](https://github.com/orgs/go-gitea/people)
|
|
||||||
- [Contributors](https://github.com/mengning/DevStar/graphs/contributors)
|
|
||||||
- [Translators](options/locale/TRANSLATORS)
|
|
||||||
|
|
||||||
## Backers
|
|
||||||
|
|
||||||
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/gitea#backer)]
|
|
||||||
|
|
||||||
<a href="https://opencollective.com/gitea#backers" target="_blank"><img src="https://opencollective.com/gitea/backers.svg?width=890"></a>
|
|
||||||
|
|
||||||
## Sponsors
|
|
||||||
|
|
||||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/gitea#sponsor)]
|
|
||||||
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/0/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/0/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/1/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/1/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/2/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/2/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/3/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/3/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/4/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/4/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/5/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/5/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/6/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/6/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/7/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/7/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/8/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/8/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/9/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/9/avatar.svg"></a>
|
|
||||||
|
|
||||||
## 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/mengning/DevStar/issues/1029).
|
|
||||||
|
|
||||||
**Where can I find the security patches?**
|
|
||||||
|
|
||||||
In the [release log](https://github.com/mengning/DevStar/releases) or the [change log](https://github.com/mengning/DevStar/blob/main/CHANGELOG.md), search for the keyword `SECURITY` to find the security patches.
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This project is licensed under the MIT License.
|
This project is licensed under the AGPL-3.0 License.
|
||||||
See the [LICENSE](https://github.com/mengning/DevStar/blob/main/LICENSE) file
|
|
||||||
for the full license text.
|
|
||||||
|
|
||||||
## Further information
|
> * **Community Edition (Free):**
|
||||||
|
> * Includes the standalone version of DevStar Studio.
|
||||||
|
> * Free to use and deploy.
|
||||||
|
> * Technical support is not included.
|
||||||
|
> * **Enterprise Edition (Paid):**
|
||||||
|
> * Requires a commercial license.
|
||||||
|
> * Unlocks Kubernetes-related features and other advanced functionalities.
|
||||||
|
> * Includes technical support.
|
||||||
|
|
||||||
<details>
|
See the [LICENSE](https://github.com/mengning/DevStar/blob/main/LICENSE) file for the full license text.
|
||||||
<summary>Looking for an overview of the interface? Check it out!</summary>
|
|
||||||
|
|
||||||
### Login/Register Page
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
### User Dashboard
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
### User Profile
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### Explore
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
### Repository
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
#### Repository Issue
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
#### Repository Pull Requests
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
#### Repository Actions
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
#### Repository Activity
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
### Organization
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
</details>
|
|
||||||
206
README.zh-cn.md
@@ -1,206 +0,0 @@
|
|||||||
# Gitea
|
|
||||||
|
|
||||||
[](https://github.com/go-gitea/gitea/actions/workflows/release-nightly.yml?query=branch%3Amain "Release Nightly")
|
|
||||||
[](https://discord.gg/Gitea "Join the Discord chat at https://discord.gg/Gitea")
|
|
||||||
[](https://goreportcard.com/report/code.gitea.io/gitea "Go Report Card")
|
|
||||||
[](https://pkg.go.dev/code.gitea.io/gitea "GoDoc")
|
|
||||||
[](https://github.com/go-gitea/gitea/releases/latest "GitHub release")
|
|
||||||
[](https://www.codetriage.com/go-gitea/gitea "Help Contribute to Open Source")
|
|
||||||
[](https://opencollective.com/gitea "Become a backer/sponsor of gitea")
|
|
||||||
[](https://opensource.org/licenses/MIT "License: MIT")
|
|
||||||
[](https://gitpod.io/#https://github.com/go-gitea/gitea)
|
|
||||||
[](https://translate.gitea.com "Crowdin")
|
|
||||||
|
|
||||||
[English](./README.md) | [繁體中文](./README.zh-tw.md)
|
|
||||||
|
|
||||||
## 目的
|
|
||||||
|
|
||||||
这个项目的目标是提供最简单、最快速、最无痛的方式来设置自托管的 Git 服务。
|
|
||||||
|
|
||||||
由于 Gitea 是用 Go 语言编写的,它可以在 Go 支持的所有平台和架构上运行,包括 Linux、macOS 和 Windows 的 x86、amd64、ARM 和 PowerPC 架构。这个项目自 2016 年 11 月从 [Gogs](https://gogs.io) [分叉](https://blog.gitea.com/welcome-to-gitea/) 而来,但已经有了很多变化。
|
|
||||||
|
|
||||||
在线演示可以访问 [demo.gitea.com](https://demo.gitea.com)。
|
|
||||||
|
|
||||||
要访问免费的 Gitea 服务(有一定数量的仓库限制),可以访问 [gitea.com](https://gitea.com/user/login)。
|
|
||||||
|
|
||||||
要快速部署您自己的专用 Gitea 实例,可以在 [cloud.gitea.com](https://cloud.gitea.com) 开始免费试用。
|
|
||||||
|
|
||||||
## 文件
|
|
||||||
|
|
||||||
您可以在我们的官方 [文件网站](https://docs.gitea.com/) 上找到全面的文件。
|
|
||||||
|
|
||||||
它包括安装、管理、使用、开发、贡献指南等,帮助您快速入门并有效地探索所有功能。
|
|
||||||
|
|
||||||
如果您有任何建议或想要贡献,可以访问 [文件仓库](https://gitea.com/gitea/docs)
|
|
||||||
|
|
||||||
## 构建
|
|
||||||
|
|
||||||
从源代码树的根目录运行:
|
|
||||||
|
|
||||||
TAGS="bindata" make build
|
|
||||||
|
|
||||||
如果需要 SQLite 支持:
|
|
||||||
|
|
||||||
TAGS="bindata sqlite sqlite_unlock_notify" make build
|
|
||||||
|
|
||||||
`build` 目标分为两个子目标:
|
|
||||||
|
|
||||||
- `make backend` 需要 [Go Stable](https://go.dev/dl/),所需版本在 [go.mod](/go.mod) 中定义。
|
|
||||||
- `make frontend` 需要 [Node.js LTS](https://nodejs.org/en/download/) 或更高版本。
|
|
||||||
|
|
||||||
需要互联网连接来下载 go 和 npm 模块。从包含预构建前端文件的官方源代码压缩包构建时,不会触发 `frontend` 目标,因此可以在没有 Node.js 的情况下构建。
|
|
||||||
|
|
||||||
更多信息:https://docs.gitea.com/installation/install-from-source
|
|
||||||
|
|
||||||
## 使用
|
|
||||||
|
|
||||||
构建后,默认情况下会在源代码树的根目录生成一个名为 `gitea` 的二进制文件。要运行它,请使用:
|
|
||||||
|
|
||||||
./gitea web
|
|
||||||
|
|
||||||
> [!注意]
|
|
||||||
> 如果您对使用我们的 API 感兴趣,我们提供了实验性支持,并附有 [文件](https://docs.gitea.com/api)。
|
|
||||||
|
|
||||||
## 贡献
|
|
||||||
|
|
||||||
预期的工作流程是:Fork -> Patch -> Push -> Pull Request
|
|
||||||
|
|
||||||
> [!注意]
|
|
||||||
>
|
|
||||||
> 1. **在开始进行 Pull Request 之前,您必须阅读 [贡献者指南](CONTRIBUTING.md)。**
|
|
||||||
> 2. 如果您在项目中发现了漏洞,请私下写信给 **security@gitea.io**。谢谢!
|
|
||||||
|
|
||||||
## 翻译
|
|
||||||
|
|
||||||
[](https://translate.gitea.com)
|
|
||||||
|
|
||||||
翻译通过 [Crowdin](https://translate.gitea.com) 进行。如果您想翻译成新的语言,请在 Crowdin 项目中请求管理员添加新语言。
|
|
||||||
|
|
||||||
您也可以创建一个 issue 来添加语言,或者在 discord 的 #translation 频道上询问。如果您需要上下文或发现一些翻译问题,可以在字符串上留言或在 Discord 上询问。对于一般的翻译问题,文档中有一个部分。目前有点空,但我们希望随着问题的出现而填充它。
|
|
||||||
|
|
||||||
更多信息请参阅 [文件](https://docs.gitea.com/contributing/localization)。
|
|
||||||
|
|
||||||
## 官方和第三方项目
|
|
||||||
|
|
||||||
我们提供了一个官方的 [go-sdk](https://gitea.com/gitea/go-sdk),一个名为 [tea](https://gitea.com/gitea/tea) 的 CLI 工具和一个 Gitea Action 的 [action runner](https://gitea.com/gitea/act_runner)。
|
|
||||||
|
|
||||||
我们在 [gitea/awesome-gitea](https://gitea.com/gitea/awesome-gitea) 维护了一个 Gitea 相关项目的列表,您可以在那里发现更多的第三方项目,包括 SDK、插件、主题等。
|
|
||||||
|
|
||||||
## 通讯
|
|
||||||
|
|
||||||
[](https://discord.gg/Gitea "Join the Discord chat at https://discord.gg/Gitea")
|
|
||||||
|
|
||||||
如果您有任何文件未涵盖的问题,可以在我们的 [Discord 服务器](https://discord.gg/Gitea) 上与我们联系,或者在 [discourse 论坛](https://forum.gitea.com/) 上创建帖子。
|
|
||||||
|
|
||||||
## 作者
|
|
||||||
|
|
||||||
- [维护者](https://github.com/orgs/go-gitea/people)
|
|
||||||
- [贡献者](https://github.com/go-gitea/gitea/graphs/contributors)
|
|
||||||
- [翻译者](options/locale/TRANSLATORS)
|
|
||||||
|
|
||||||
## 支持者
|
|
||||||
|
|
||||||
感谢所有支持者! 🙏 [[成为支持者](https://opencollective.com/gitea#backer)]
|
|
||||||
|
|
||||||
<a href="https://opencollective.com/gitea#backers" target="_blank"><img src="https://opencollective.com/gitea/backers.svg?width=890"></a>
|
|
||||||
|
|
||||||
## 赞助商
|
|
||||||
|
|
||||||
通过成为赞助商来支持这个项目。您的标志将显示在这里,并带有链接到您的网站。 [[成为赞助商](https://opencollective.com/gitea#sponsor)]
|
|
||||||
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/0/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/0/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/1/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/1/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/2/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/2/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/3/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/3/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/4/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/4/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/5/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/5/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/6/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/6/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/7/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/7/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/8/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/8/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/9/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/9/avatar.svg"></a>
|
|
||||||
|
|
||||||
## 常见问题
|
|
||||||
|
|
||||||
**Gitea 怎么发音?**
|
|
||||||
|
|
||||||
Gitea 的发音是 [/ɡɪ’ti:/](https://youtu.be/EM71-2uDAoY),就像 "gi-tea" 一样,g 是硬音。
|
|
||||||
|
|
||||||
**为什么这个项目没有托管在 Gitea 实例上?**
|
|
||||||
|
|
||||||
我们正在 [努力](https://github.com/go-gitea/gitea/issues/1029)。
|
|
||||||
|
|
||||||
**在哪里可以找到安全补丁?**
|
|
||||||
|
|
||||||
在 [发布日志](https://github.com/go-gitea/gitea/releases) 或 [变更日志](https://github.com/go-gitea/gitea/blob/main/CHANGELOG.md) 中,搜索关键词 `SECURITY` 以找到安全补丁。
|
|
||||||
|
|
||||||
## 许可证
|
|
||||||
|
|
||||||
这个项目是根据 MIT 许可证授权的。
|
|
||||||
请参阅 [LICENSE](https://github.com/go-gitea/gitea/blob/main/LICENSE) 文件以获取完整的许可证文本。
|
|
||||||
|
|
||||||
## 进一步信息
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>寻找界面概述?查看这里!</summary>
|
|
||||||
|
|
||||||
### 登录/注册页面
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
### 用户仪表板
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
### 用户资料
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### 探索
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
### 仓库
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
#### 仓库问题
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
#### 仓库拉取请求
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
#### 仓库操作
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
#### 仓库活动
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
### 组织
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
</details>
|
|
||||||
206
README.zh-tw.md
@@ -1,206 +0,0 @@
|
|||||||
# Gitea
|
|
||||||
|
|
||||||
[](https://github.com/go-gitea/gitea/actions/workflows/release-nightly.yml?query=branch%3Amain "Release Nightly")
|
|
||||||
[](https://discord.gg/Gitea "Join the Discord chat at https://discord.gg/Gitea")
|
|
||||||
[](https://goreportcard.com/report/code.gitea.io/gitea "Go Report Card")
|
|
||||||
[](https://pkg.go.dev/code.gitea.io/gitea "GoDoc")
|
|
||||||
[](https://github.com/go-gitea/gitea/releases/latest "GitHub release")
|
|
||||||
[](https://www.codetriage.com/go-gitea/gitea "Help Contribute to Open Source")
|
|
||||||
[](https://opencollective.com/gitea "Become a backer/sponsor of gitea")
|
|
||||||
[](https://opensource.org/licenses/MIT "License: MIT")
|
|
||||||
[](https://gitpod.io/#https://github.com/go-gitea/gitea)
|
|
||||||
[](https://translate.gitea.com "Crowdin")
|
|
||||||
|
|
||||||
[English](./README.md) | [简体中文](./README.zh-cn.md)
|
|
||||||
|
|
||||||
## 目的
|
|
||||||
|
|
||||||
這個項目的目標是提供最簡單、最快速、最無痛的方式來設置自託管的 Git 服務。
|
|
||||||
|
|
||||||
由於 Gitea 是用 Go 語言編寫的,它可以在 Go 支援的所有平台和架構上運行,包括 Linux、macOS 和 Windows 的 x86、amd64、ARM 和 PowerPC 架構。這個項目自 2016 年 11 月從 [Gogs](https://gogs.io) [分叉](https://blog.gitea.com/welcome-to-gitea/) 而來,但已經有了很多變化。
|
|
||||||
|
|
||||||
在線演示可以訪問 [demo.gitea.com](https://demo.gitea.com)。
|
|
||||||
|
|
||||||
要訪問免費的 Gitea 服務(有一定數量的倉庫限制),可以訪問 [gitea.com](https://gitea.com/user/login)。
|
|
||||||
|
|
||||||
要快速部署您自己的專用 Gitea 實例,可以在 [cloud.gitea.com](https://cloud.gitea.com) 開始免費試用。
|
|
||||||
|
|
||||||
## 文件
|
|
||||||
|
|
||||||
您可以在我們的官方 [文件網站](https://docs.gitea.com/) 上找到全面的文件。
|
|
||||||
|
|
||||||
它包括安裝、管理、使用、開發、貢獻指南等,幫助您快速入門並有效地探索所有功能。
|
|
||||||
|
|
||||||
如果您有任何建議或想要貢獻,可以訪問 [文件倉庫](https://gitea.com/gitea/docs)
|
|
||||||
|
|
||||||
## 構建
|
|
||||||
|
|
||||||
從源代碼樹的根目錄運行:
|
|
||||||
|
|
||||||
TAGS="bindata" make build
|
|
||||||
|
|
||||||
如果需要 SQLite 支援:
|
|
||||||
|
|
||||||
TAGS="bindata sqlite sqlite_unlock_notify" make build
|
|
||||||
|
|
||||||
`build` 目標分為兩個子目標:
|
|
||||||
|
|
||||||
- `make backend` 需要 [Go Stable](https://go.dev/dl/),所需版本在 [go.mod](/go.mod) 中定義。
|
|
||||||
- `make frontend` 需要 [Node.js LTS](https://nodejs.org/en/download/) 或更高版本。
|
|
||||||
|
|
||||||
需要互聯網連接來下載 go 和 npm 模塊。從包含預構建前端文件的官方源代碼壓縮包構建時,不會觸發 `frontend` 目標,因此可以在沒有 Node.js 的情況下構建。
|
|
||||||
|
|
||||||
更多信息:https://docs.gitea.com/installation/install-from-source
|
|
||||||
|
|
||||||
## 使用
|
|
||||||
|
|
||||||
構建後,默認情況下會在源代碼樹的根目錄生成一個名為 `gitea` 的二進制文件。要運行它,請使用:
|
|
||||||
|
|
||||||
./gitea web
|
|
||||||
|
|
||||||
> [!注意]
|
|
||||||
> 如果您對使用我們的 API 感興趣,我們提供了實驗性支援,並附有 [文件](https://docs.gitea.com/api)。
|
|
||||||
|
|
||||||
## 貢獻
|
|
||||||
|
|
||||||
預期的工作流程是:Fork -> Patch -> Push -> Pull Request
|
|
||||||
|
|
||||||
> [!注意]
|
|
||||||
>
|
|
||||||
> 1. **在開始進行 Pull Request 之前,您必須閱讀 [貢獻者指南](CONTRIBUTING.md)。**
|
|
||||||
> 2. 如果您在項目中發現了漏洞,請私下寫信給 **security@gitea.io**。謝謝!
|
|
||||||
|
|
||||||
## 翻譯
|
|
||||||
|
|
||||||
[](https://translate.gitea.com)
|
|
||||||
|
|
||||||
翻譯通過 [Crowdin](https://translate.gitea.com) 進行。如果您想翻譯成新的語言,請在 Crowdin 項目中請求管理員添加新語言。
|
|
||||||
|
|
||||||
您也可以創建一個 issue 來添加語言,或者在 discord 的 #translation 頻道上詢問。如果您需要上下文或發現一些翻譯問題,可以在字符串上留言或在 Discord 上詢問。對於一般的翻譯問題,文檔中有一個部分。目前有點空,但我們希望隨著問題的出現而填充它。
|
|
||||||
|
|
||||||
更多信息請參閱 [文件](https://docs.gitea.com/contributing/localization)。
|
|
||||||
|
|
||||||
## 官方和第三方項目
|
|
||||||
|
|
||||||
我們提供了一個官方的 [go-sdk](https://gitea.com/gitea/go-sdk),一個名為 [tea](https://gitea.com/gitea/tea) 的 CLI 工具和一個 Gitea Action 的 [action runner](https://gitea.com/gitea/act_runner)。
|
|
||||||
|
|
||||||
我們在 [gitea/awesome-gitea](https://gitea.com/gitea/awesome-gitea) 維護了一個 Gitea 相關項目的列表,您可以在那裡發現更多的第三方項目,包括 SDK、插件、主題等。
|
|
||||||
|
|
||||||
## 通訊
|
|
||||||
|
|
||||||
[](https://discord.gg/Gitea "Join the Discord chat at https://discord.gg/Gitea")
|
|
||||||
|
|
||||||
如果您有任何文件未涵蓋的問題,可以在我們的 [Discord 服務器](https://discord.gg/Gitea) 上與我們聯繫,或者在 [discourse 論壇](https://forum.gitea.com/) 上創建帖子。
|
|
||||||
|
|
||||||
## 作者
|
|
||||||
|
|
||||||
- [維護者](https://github.com/orgs/go-gitea/people)
|
|
||||||
- [貢獻者](https://github.com/go-gitea/gitea/graphs/contributors)
|
|
||||||
- [翻譯者](options/locale/TRANSLATORS)
|
|
||||||
|
|
||||||
## 支持者
|
|
||||||
|
|
||||||
感謝所有支持者! 🙏 [[成為支持者](https://opencollective.com/gitea#backer)]
|
|
||||||
|
|
||||||
<a href="https://opencollective.com/gitea#backers" target="_blank"><img src="https://opencollective.com/gitea/backers.svg?width=890"></a>
|
|
||||||
|
|
||||||
## 贊助商
|
|
||||||
|
|
||||||
通過成為贊助商來支持這個項目。您的標誌將顯示在這裡,並帶有鏈接到您的網站。 [[成為贊助商](https://opencollective.com/gitea#sponsor)]
|
|
||||||
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/0/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/0/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/1/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/1/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/2/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/2/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/3/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/3/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/4/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/4/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/5/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/5/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/6/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/6/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/7/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/7/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/8/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/8/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/gitea/sponsor/9/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/9/avatar.svg"></a>
|
|
||||||
|
|
||||||
## 常見問題
|
|
||||||
|
|
||||||
**Gitea 怎麼發音?**
|
|
||||||
|
|
||||||
Gitea 的發音是 [/ɡɪ’ti:/](https://youtu.be/EM71-2uDAoY),就像 "gi-tea" 一樣,g 是硬音。
|
|
||||||
|
|
||||||
**為什麼這個項目沒有託管在 Gitea 實例上?**
|
|
||||||
|
|
||||||
我們正在 [努力](https://github.com/go-gitea/gitea/issues/1029)。
|
|
||||||
|
|
||||||
**在哪裡可以找到安全補丁?**
|
|
||||||
|
|
||||||
在 [發佈日誌](https://github.com/go-gitea/gitea/releases) 或 [變更日誌](https://github.com/go-gitea/gitea/blob/main/CHANGELOG.md) 中,搜索關鍵詞 `SECURITY` 以找到安全補丁。
|
|
||||||
|
|
||||||
## 許可證
|
|
||||||
|
|
||||||
這個項目是根據 MIT 許可證授權的。
|
|
||||||
請參閱 [LICENSE](https://github.com/go-gitea/gitea/blob/main/LICENSE) 文件以獲取完整的許可證文本。
|
|
||||||
|
|
||||||
## 進一步信息
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>尋找界面概述?查看這裡!</summary>
|
|
||||||
|
|
||||||
### 登錄/註冊頁面
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
### 用戶儀表板
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
### 用戶資料
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### 探索
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
### 倉庫
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
#### 倉庫問題
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
#### 倉庫拉取請求
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
#### 倉庫操作
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
#### 倉庫活動
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
### 組織
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
</details>
|
|
||||||
15
docs/README.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# DevStar Design文档相关列表
|
||||||
|
|
||||||
|
设计相关的放在devstar/devstar仓库/docs目录下,用户使用相关文档放在devstar/docs仓库,并将两者对应起来如下:
|
||||||
|
|
||||||
|
## CI/CD Workflow ( Actions/[act_runner](https://devstar.cn/devstar/act_runner) )
|
||||||
|
|
||||||
|
* [安装配置和使用](https://devstar.cn/devstar/docs/)
|
||||||
|
* 设计说明
|
||||||
|
* actions ...
|
||||||
|
|
||||||
|
## 开发环境容器Devcontainer
|
||||||
|
|
||||||
|
* 安装配置使用说明
|
||||||
|
* [webTerminal](https://devstar.cn/devstar/webTerminal) for DevStar devcontainer
|
||||||
|
* [devstar-vscode](https://devstar.cn/devstar/devstar-vscode)
|
||||||
@@ -1,124 +0,0 @@
|
|||||||
# Devstar 部署文档
|
|
||||||
|
|
||||||
## 1. 安装 Helm
|
|
||||||
|
|
||||||
在开始部署前,请先安装 Helm。建议使用官方提供的安装脚本,具体步骤可参考:安装 Helm | Helm。
|
|
||||||
|
|
||||||
推荐使用 `get_helm.sh`脚本进行安装,执行如下命令:
|
|
||||||
|
|
||||||
```
|
|
||||||
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
|
|
||||||
chmod 700 get_helm.sh
|
|
||||||
./get_helm.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
## 2. 获取并准备部署文件
|
|
||||||
|
|
||||||
在待部署的机器上新建一个目录,然后将 DevStar 的 Helm Chart 仓库克隆到该目录中。请注意,该仓库为私有仓库,需先获取访问权限。
|
|
||||||
|
|
||||||
如部署目标为 `devstar.cn`,请确保切换到对应的分支(如图所示):
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
将代码仓库克隆到本地后,目录中应包含以下四个脚本文件:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 3. 首次安装
|
|
||||||
|
|
||||||
执行 `step1-install-helm.sh`脚本进行首次安装。安装时间取决于网络状况和镜像拉取速度,请耐心等待。
|
|
||||||
|
|
||||||
安装完成后,使用以下命令检查 Pod 状态:
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl get pods -n devstar-studio-ns
|
|
||||||
```
|
|
||||||
|
|
||||||
如发现 Pod 状态异常,可使用如下命令排查:
|
|
||||||
|
|
||||||
- 查看 Pod 日志:
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl logs -n devstar-studio-ns <pod名称>
|
|
||||||
```
|
|
||||||
|
|
||||||
- 查看 Pod 详细信息:
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl describe pod -n devstar-studio-ns <pod名称>
|
|
||||||
```
|
|
||||||
|
|
||||||
首次安装时,Pod 可能处于 `Pending`状态,通常是由于 PVC(PersistentVolumeClaim)未绑定到对应的 PV(PersistentVolume)所致。请检查 PV 与 PVC 的状态:
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl get pv -A
|
|
||||||
kubectl get pvc -A
|
|
||||||
```
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
如发现有 PVC 处于 `Pending`状态,请手动创建并绑定对应的 PV。以下为 PV 的示例 YAML 配置,请根据实际情况修改相应字段:
|
|
||||||
|
|
||||||
```
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolume
|
|
||||||
metadata:
|
|
||||||
name: node2-local-pv-gitea # 请根据实际情况修改名称
|
|
||||||
spec:
|
|
||||||
capacity:
|
|
||||||
storage: 10Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
storageClassName: local
|
|
||||||
persistentVolumeReclaimPolicy: Retain
|
|
||||||
local:
|
|
||||||
path: /mnt/datadisk/devstar/gitea-storage # 修改为实际存储路径
|
|
||||||
nodeAffinity:
|
|
||||||
required:
|
|
||||||
nodeSelectorTerms:
|
|
||||||
- matchExpressions:
|
|
||||||
- key: kubernetes.io/hostname
|
|
||||||
operator: In
|
|
||||||
values:
|
|
||||||
- node2 # 修改为实际节点名称
|
|
||||||
volumeMode: Filesystem
|
|
||||||
claimRef:
|
|
||||||
name: gitea-shared-storage-claim
|
|
||||||
namespace: devstar-studio-ns
|
|
||||||
```
|
|
||||||
|
|
||||||
使用以下命令应用 PV 配置:
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl apply -f <yaml文件名>
|
|
||||||
```
|
|
||||||
|
|
||||||
## 4. 域名解析与证书配置
|
|
||||||
|
|
||||||
如部署环境为公网可访问(如 `devstar.cn`),请在腾讯云(或其他域名服务商)控制台中配置域名解析,并申请及配置 HTTPS 证书。具体操作请参考相关证书配置文档。
|
|
||||||
|
|
||||||
## 5. 更新部署
|
|
||||||
|
|
||||||
若修改了 `values.yaml`文件,请执行 `step2-upgrade-helm.sh`脚本进行更新。更新完成后,会看到类似如下提示:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
更新后请再次检查 Pod 状态:
|
|
||||||
|
|
||||||
```
|
|
||||||
kubectl get pods -n devstar-studio-ns
|
|
||||||
```
|
|
||||||
|
|
||||||
## 6. 验证部署版本
|
|
||||||
|
|
||||||
您可以通过以下两种方式确认 DevStar 的版本是否更新成功:
|
|
||||||
|
|
||||||
1. **在 DevStar 主界面查看**登录系统后,可在主界面右下角查看当前版本号。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. **在流水线页面查看**进入“工作流”→“流水线”,在如图所示位置也可查看版本信息:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
通过比对版本号,即可确认系统是否已成功更新至目标版本。
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
# SSL 证书配置与续期指南
|
|
||||||
|
|
||||||
目前需要配置证书的有devstar.cn和dev.devstar.cn
|
|
||||||
|
|
||||||
## 一、证书申请与续期
|
|
||||||
|
|
||||||
腾讯云提供的免费 HTTPS 证书有效期为 **90 天**,系统会在到期前通过短信提醒您及时续期。
|
|
||||||
|
|
||||||
### 操作步骤:
|
|
||||||
|
|
||||||
登录腾讯云控制台,搜索进入 **SSL 证书**管理页面。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
在证书列表中查看已申请证书的有效期及到期时间。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
点击右侧的 **快速续期**进入续期界面。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
选择 **自动 DNS 验证**并勾选 **自动删除旧验证记录**,提交后等待证书签发。
|
|
||||||
|
|
||||||
证书签发后,在下载界面选择 **Nginx**格式,下载包含 `.crt`和 `.key`文件的证书包。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
在master节点登录集群,进入当前要更新的域名对应的文件夹
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 二、证书部署
|
|
||||||
|
|
||||||
### 部署流程:
|
|
||||||
|
|
||||||
登录 Kubernetes 集群的 Master 节点,进入目标域名对应的证书目录。
|
|
||||||
|
|
||||||
将下载的 `.crt`和 `.key`文件上传至服务器,覆盖原有证书文件。
|
|
||||||
|
|
||||||
执行相应的脚本完成证书更新:**首次部署**:使用 `make-k8s-tls-secret.sh`**证书续期**:使用 `update-xxx-tls-secret.sh`
|
|
||||||
|
|
||||||

|
|
||||||
repo.diff.bin
docs/devstar-deploy/assets/image-20251104201036920.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 15 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104201132614.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 14 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104203152647.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 56 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104203353406.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 56 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104203454915.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 55 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104203757243.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 51 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104204421088.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 7.9 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104204424116.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 7.9 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104204453766.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 128 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104221729545.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 15 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104221749140.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 41 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104221811555.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 107 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104221928154.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 29 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104221950856.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 7.5 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104221953043.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 7.5 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104222023293.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 21 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104224918197.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 199 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104224951191.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 187 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104225007427.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 69 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104225042423.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 192 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104225305942.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 96 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104225334394.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 49 KiB |
repo.diff.bin
docs/devstar-deploy/assets/image-20251104225929257.png
|
repo.diff.file_before repo.diff.file_image_width: | repo.diff.file_image_height: | repo.diff.file_byte_size: 32 KiB |
@@ -2,14 +2,13 @@
|
|||||||
# Copyright 2024 Mengning Software All rights reserved.
|
# Copyright 2024 Mengning Software All rights reserved.
|
||||||
|
|
||||||
# 默认值
|
# 默认值
|
||||||
NAME=DevStar-Studio
|
NAME="DevStar-Studio-$(date +%Y%m%d-%H-%M-%S)"
|
||||||
IMAGE_REGISTRY_USER=mengning997
|
IMAGE_REGISTRY_USER=mengning997
|
||||||
IMAGE_NAME=devstar-studio
|
IMAGE_NAME=devstar-studio
|
||||||
VERSION=latest # DevStar Studio的默认版本为最新版本
|
VERSION=latest # DevStar Studio的默认版本为最新版本
|
||||||
PORT=80 # 设置端口默认值为 80
|
PORT=80 # 设置端口默认值为 80
|
||||||
SSH_PORT=2222 # 设置ssh默认端口号2222
|
SSH_PORT=2222 # 设置ssh默认端口号2222
|
||||||
DATA_DIR=${HOME}/devstar_data
|
DATA_DIR=${HOME}/devstar_data
|
||||||
APP_INI=${DATA_DIR}/app.ini
|
|
||||||
|
|
||||||
# 错误处理函数
|
# 错误处理函数
|
||||||
error_handler() {
|
error_handler() {
|
||||||
@@ -111,25 +110,24 @@ function start {
|
|||||||
mkdir -p $DATA_DIR
|
mkdir -p $DATA_DIR
|
||||||
sudo chown 1000:1000 $DATA_DIR
|
sudo chown 1000:1000 $DATA_DIR
|
||||||
sudo chmod 666 /var/run/docker.sock
|
sudo chmod 666 /var/run/docker.sock
|
||||||
if [ ! -f "$APP_INI" ]; then
|
DOMAIN_NAME=$(hostname -I | awk '{print $1}')
|
||||||
DOMAIN_NAME=$(hostname -I | awk '{print $1}')
|
if [ ! -f "${DATA_DIR}/app.ini" ]; then
|
||||||
echo "DOMAIN_NAME=$DOMAIN_NAME"
|
echo "DOMAIN_NAME=$DOMAIN_NAME"
|
||||||
else
|
else
|
||||||
# 读取 DOMAIN 值
|
# 读取 DOMAIN 值
|
||||||
DOMAIN_NAME=$(grep -E '^\s*DOMAIN\s*=' "$APP_INI" | cut -d'=' -f2 | xargs)
|
DOMAIN_NAME_APP_INI=$(grep -E '^\s*DOMAIN\s*=' "${DATA_DIR}/app.ini" | cut -d'=' -f2 | xargs)
|
||||||
# 检查是否成功读取到值
|
# 检查是否成功读取到值
|
||||||
if [[ -z "$DOMAIN_NAME" ]]; then
|
if [[ -n "$DOMAIN_NAME_APP_INI" ]]; then
|
||||||
DOMAIN_NAME="localhost"
|
DOMAIN_NAME=$DOMAIN_NAME_APP_INI
|
||||||
fi
|
fi
|
||||||
echo "DOMAIN_NAME=$DOMAIN_NAME"
|
echo "DOMAIN_NAME=$DOMAIN_NAME"
|
||||||
fi
|
fi
|
||||||
# 启动devstar-studio容器
|
# 启动devstar-studio容器
|
||||||
stop
|
|
||||||
if [[ -z "$IMAGE_STR" ]]; then
|
if [[ -z "$IMAGE_STR" ]]; then
|
||||||
IMAGE_STR="$IMAGE_REGISTRY_USER/$IMAGE_NAME:$VERSION"
|
IMAGE_STR="$IMAGE_REGISTRY_USER/$IMAGE_NAME:$VERSION"
|
||||||
fi
|
fi
|
||||||
echo "image=$IMAGE_STR"
|
echo "image=$IMAGE_STR"
|
||||||
sudo docker run --restart=always --name $NAME -d -p $PORT:3000 -p $SSH_PORT:$SSH_PORT -v /var/run/docker.sock:/var/run/docker.sock -v ~/devstar_data:/var/lib/gitea -v ~/devstar_data:/etc/gitea $IMAGE_STR
|
sudo docker run --restart=always --name $NAME -d -p $PORT:3000 -p $SSH_PORT:$SSH_PORT -v /var/run/docker.sock:/var/run/docker.sock -v ${DATA_DIR}:/var/lib/gitea -v ${DATA_DIR}:/etc/gitea $IMAGE_STR
|
||||||
# 打开 `http://localhost:8080` 完成安装。
|
# 打开 `http://localhost:8080` 完成安装。
|
||||||
success "-------------------------------------------------------"
|
success "-------------------------------------------------------"
|
||||||
success "DevStar started in http://$DOMAIN_NAME:$PORT successfully!"
|
success "DevStar started in http://$DOMAIN_NAME:$PORT successfully!"
|
||||||
@@ -139,11 +137,9 @@ function start {
|
|||||||
|
|
||||||
# Function to stop
|
# Function to stop
|
||||||
function stop {
|
function stop {
|
||||||
if [ $(docker ps -a --filter "name=^/${NAME}$" -q | wc -l) -gt 0 ]; then
|
if [ $(docker ps -a --filter "name=^/DevStar-Studio.*|devstar-studio.*" -q | wc -l) -gt 0 ]; then
|
||||||
sudo docker stop $NAME && sudo docker rm -f $NAME
|
sudo docker stop $(docker ps -a --filter "name=^/DevStar-Studio.*|devstar-studio.*" -q) && \
|
||||||
fi
|
sudo docker rm -f $(docker ps -a --filter "name=^/DevStar-Studio.*|devstar-studio.*" -q)
|
||||||
if [ $(docker ps -a --filter "name=^/devstar-studio$" -q | wc -l) -gt 0 ]; then
|
|
||||||
sudo docker stop devstar-studio && sudo docker rm -f devstar-studio
|
|
||||||
fi
|
fi
|
||||||
if [ $(docker ps -a --filter "name=^/webterminal-" -q | wc -l) -gt 0 ]; then
|
if [ $(docker ps -a --filter "name=^/webterminal-" -q | wc -l) -gt 0 ]; then
|
||||||
sudo docker stop $(docker ps -a --filter "name=^/webterminal-" -q) && sudo docker rm -f $(docker ps -a --filter "name=^/webterminal-" -q)
|
sudo docker stop $(docker ps -a --filter "name=^/webterminal-" -q) && sudo docker rm -f $(docker ps -a --filter "name=^/webterminal-" -q)
|
||||||
@@ -156,13 +152,22 @@ function stop {
|
|||||||
# Function to logs
|
# Function to logs
|
||||||
function logs {
|
function logs {
|
||||||
# 查看devstar-studio容器的运行日志
|
# 查看devstar-studio容器的运行日志
|
||||||
sudo docker logs $NAME
|
sudo docker ps -a --filter "name=^/DevStar-Studio.*|devstar-studio.*" --format "table {{.ID}}\t{{.Names}}" | tail -n +2 | while read container_id container_name; do
|
||||||
|
echo "=== 容器日志: $container_name (ID: $container_id) ==="
|
||||||
|
sudo docker logs "$container_id"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to clean
|
# Function to clean
|
||||||
function clean {
|
function clean {
|
||||||
stop
|
stop
|
||||||
rm -rf $DATA_DIR
|
read -p "警告:即将永久删除目录 $DATA_DIR,此操作不可恢复!请输入 'YES' 确认: " confirm
|
||||||
|
if [[ "$confirm" == "YES" ]]; then
|
||||||
|
rm -rf "$DATA_DIR"
|
||||||
|
echo "目录已删除"
|
||||||
|
else
|
||||||
|
echo "操作已取消"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to usage help
|
# Function to usage help
|
||||||
@@ -173,6 +178,7 @@ function usage {
|
|||||||
success " start Start DevStar Studio"
|
success " start Start DevStar Studio"
|
||||||
success " --port=<arg> Specify the port number (default port is 80)"
|
success " --port=<arg> Specify the port number (default port is 80)"
|
||||||
success " --ssh-port=<arg> Specify the ssh-port number (default ssh-port is 2222)"
|
success " --ssh-port=<arg> Specify the ssh-port number (default ssh-port is 2222)"
|
||||||
|
success " --data-dir=<arg> Specify the data directory (default data directory is ~/devstar_data)"
|
||||||
success " --version=<arg> Specify the DevStar Studio Image Version (default verson is latest)"
|
success " --version=<arg> Specify the DevStar Studio Image Version (default verson is latest)"
|
||||||
success " --image=<arg> Specify the DevStar Studio Image example: devstar-studio:latest "
|
success " --image=<arg> Specify the DevStar Studio Image example: devstar-studio:latest "
|
||||||
success " stop Stop the running DevStar Studio"
|
success " stop Stop the running DevStar Studio"
|
||||||
@@ -188,7 +194,7 @@ case "$1" in
|
|||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
start)
|
start)
|
||||||
ARGS=$(getopt --long port::,ssh-port::,version::,image:: -- "$@")
|
ARGS=$(getopt --long port::,ssh-port::,data-dir::,version::,image:: -- "$@")
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
failure "ARGS ERROR!"
|
failure "ARGS ERROR!"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -205,6 +211,10 @@ case "$1" in
|
|||||||
SSH_PORT="$2"
|
SSH_PORT="$2"
|
||||||
echo "The SSH_Port is: $SSH_PORT"
|
echo "The SSH_Port is: $SSH_PORT"
|
||||||
shift 2 ;;
|
shift 2 ;;
|
||||||
|
--data-dir)
|
||||||
|
DATA_DIR="$2"
|
||||||
|
echo "The SSH_Port is: $DATA_DIR"
|
||||||
|
shift 2 ;;
|
||||||
--version)
|
--version)
|
||||||
VERSION="$2"
|
VERSION="$2"
|
||||||
echo "The DevStar Studio Image Version is: $VERSION"
|
echo "The DevStar Studio Image Version is: $VERSION"
|
||||||
|
|||||||
@@ -400,25 +400,25 @@ func repoAssignment(ctx *Context, repo *repo_model.Repository) {
|
|||||||
if ctx.Doer != nil {
|
if ctx.Doer != nil {
|
||||||
ctx.Data["AllowCreateDevcontainer"] = ctx.Doer.AllowCreateDevcontainer
|
ctx.Data["AllowCreateDevcontainer"] = ctx.Doer.AllowCreateDevcontainer
|
||||||
ctx.Data["AllowCreateActRunner"] = ctx.Doer.AllowCreateActRunner
|
ctx.Data["AllowCreateActRunner"] = ctx.Doer.AllowCreateActRunner
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
query := ctx.Req.URL.Query()
|
query := ctx.Req.URL.Query()
|
||||||
userID := query.Get("user")
|
userID := query.Get("user")
|
||||||
userNum, err := strconv.ParseInt(userID, 10, 64)
|
if userID != "" {
|
||||||
if err != nil {
|
userNum, err := strconv.ParseInt(userID, 10, 64)
|
||||||
return
|
if err == nil {
|
||||||
}
|
u, err := user_model.GetUserByID(ctx, userNum)
|
||||||
u, err := user_model.GetUserByID(ctx, userNum)
|
if err != nil {
|
||||||
if err != nil {
|
if user_model.IsErrUserNotExist(err) {
|
||||||
if user_model.IsErrUserNotExist(err) {
|
ctx.Redirect(setting.AppSubURL + "/-/admin/users")
|
||||||
ctx.Redirect(setting.AppSubURL + "/-/admin/users")
|
} else {
|
||||||
} else {
|
ctx.ServerError("GetUserByID", err)
|
||||||
ctx.ServerError("GetUserByID", err)
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ctx.Data["AllowCreateDevcontainer"] = u.AllowCreateDevcontainer
|
||||||
|
ctx.Data["AllowCreateActRunner"] = u.AllowCreateActRunner
|
||||||
}
|
}
|
||||||
return
|
|
||||||
}
|
}
|
||||||
ctx.Data["AllowCreateDevcontainer"] = u.AllowCreateDevcontainer
|
|
||||||
ctx.Data["AllowCreateActRunner"] = u.AllowCreateActRunner
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if repo.IsMirror {
|
if repo.IsMirror {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
{{template "custom/extra_links" .}}
|
{{template "custom/extra_links" .}}
|
||||||
|
|
||||||
{{if not .IsSigned}}
|
{{if not .IsSigned}}
|
||||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">{{ctx.Locale.Tr "help"}}</a>
|
<a class="item" target="_blank" rel="noopener noreferrer" href="https://mengning.com.cn/src/devstar/">{{ctx.Locale.Tr "help"}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
{{svg "octicon-tools"}}
|
{{svg "octicon-tools"}}
|
||||||
{{ctx.Locale.Tr "your_settings"}}
|
{{ctx.Locale.Tr "your_settings"}}
|
||||||
</a>
|
</a>
|
||||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">
|
<a class="item" target="_blank" rel="noopener noreferrer" href="https://mengning.com.cn/src/devstar/">
|
||||||
{{svg "octicon-question"}}
|
{{svg "octicon-question"}}
|
||||||
{{ctx.Locale.Tr "help"}}
|
{{ctx.Locale.Tr "help"}}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||