add option

This commit is contained in:
2025-09-01 06:04:51 +00:00
parent f4d95dfff4
commit b4bb4896af
5 changed files with 143 additions and 2 deletions

View File

@@ -58,6 +58,7 @@ organization = Organization
mirror = Mirror
issue_milestone = Milestone
new_repo = New Repository
new_repo_from_template=Create from Template
new_migrate = New Migration
new_mirror = New Mirror
new_fork = New Repository Fork

View File

@@ -56,6 +56,7 @@ organization=组织
mirror=镜像
issue_milestone=里程碑
new_repo=创建仓库
new_repo_from_template=从模板创建仓库
new_migrate=迁移外部仓库
new_mirror=创建新的镜像
new_fork=派生新仓库

View File

@@ -0,0 +1,134 @@
{
"id": "mnsoftware",
"name": "Mengningsoftware",
"description": "High-performance HTTP server and reverse proxy",
"category": "web-server",
"tags": ["web", "proxy", "http", "server"],
"icon": "https://www.mengning.com.cn/assets/images/mengninglogo.png",
"author": "Mengningsoftware Inc",
"website": "https://www.mengning.com.cn/",
"repository": "https://devstar.cn/lat5211/devstar_introduction.git",
"license": "BSD-2-Clause",
"version": "1.0.0",
"deployment_type": "both",
"config": {
"schema": {
"port": {
"type": "int",
"description": "Port number for the web server",
"required": true,
"min": 1,
"max": 65535,
"placeholder": "Enter port number"
},
"server_name": {
"type": "string",
"description": "Server name for virtual host",
"required": false,
"pattern": "^[a-zA-Z0-9.-]+$",
"placeholder": "Enter server name"
},
"ssl_enabled": {
"type": "bool",
"description": "Enable SSL/TLS support",
"required": false,
"help": "Enable HTTPS support"
},
"log_level": {
"type": "select",
"description": "Logging level",
"required": false,
"options": ["debug", "info", "warn", "error"]
}
},
"default": {
"port": 80,
"server_name": "localhost",
"ssl_enabled": false,
"log_level": "info"
}
},
"requirements": {
"min_memory": "128MB",
"min_cpu": "1 core",
"min_storage": "100MB",
"os": "linux",
"arch": "x86_64"
},
"deploy": {
"type": "docker",
"docker": {
"image": "crpi-pqfsp88s5zx2zwfq.cn-hangzhou.personal.cr.aliyuncs.com/devstar/devstar_introduction",
"tag": "1.24.0",
"ports": [
{
"host_port": 80,
"container_port": 80,
"protocol": "tcp",
"name": "http"
},
{
"host_port": 443,
"container_port": 443,
"protocol": "tcp",
"name": "https"
}
],
"volumes": [
{
"host_path": "/var/log/nginx",
"container_path": "/var/log/nginx",
"type": "bind"
},
{
"host_path": "/etc/nginx/conf.d",
"container_path": "/etc/nginx/conf.d",
"type": "bind"
}
],
"environment": {
"NGINX_VERSION": "1.24.0"
},
"resources": {
"cpu": "500m",
"memory": "512Mi"
}
},
"kubernetes": {
"namespace": "web-servers",
"replicas": 2,
"image": "crpi-pqfsp88s5zx2zwfq.cn-hangzhou.personal.cr.aliyuncs.com/devstar/devstar_introduction",
"tag": "1.24.0",
"ports": [
{
"container_port": 80,
"protocol": "tcp",
"name": "http"
}
],
"volumes": [
{
"container_path": "/var/log/nginx",
"type": "emptyDir"
}
],
"environment": {
"NGINX_VERSION": "1.24.0"
},
"resources": {
"cpu": "500m",
"memory": "512Mi"
},
"service": {
"type": "ClusterIP",
"ports": [
{
"container_port": 80,
"protocol": "tcp",
"name": "http"
}
]
}
}
}
}

View File

@@ -73,6 +73,9 @@
<a class="item" href="{{AppSubUrl}}/repo/create">
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
</a>
<a class="item" href="{{AppSubUrl}}/repo/create">
{{svg "octicon-plus-circle"}} {{ctx.Locale.Tr "new_repo_from_template"}}
</a>
{{if not .DisableMigrations}}
<a class="item" href="{{AppSubUrl}}/repo/migrate">
{{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate"}}

View File

@@ -57,6 +57,7 @@ import octiconMirror from '../../public/assets/img/svg/octicon-mirror.svg';
import octiconOrganization from '../../public/assets/img/svg/octicon-organization.svg';
import octiconPlay from '../../public/assets/img/svg/octicon-play.svg';
import octiconPlus from '../../public/assets/img/svg/octicon-plus.svg';
import octiconPlusCircle from '../../public/assets/img/svg/octicon-plus-circle.svg';
import octiconProject from '../../public/assets/img/svg/octicon-project.svg';
import octiconQuote from '../../public/assets/img/svg/octicon-quote.svg';
import octiconRepo from '../../public/assets/img/svg/octicon-repo.svg';
@@ -136,6 +137,7 @@ const svgs = {
'octicon-organization': octiconOrganization,
'octicon-play': octiconPlay,
'octicon-plus': octiconPlus,
'octicon-plus-circle': octiconPlusCircle,
'octicon-project': octiconProject,
'octicon-quote': octiconQuote,
'octicon-repo': octiconRepo,