From 13a1a439d85b83ef449f87c0b7fca6968afaec47 Mon Sep 17 00:00:00 2001 From: Walker Lee Date: Thu, 8 Nov 2018 05:09:04 +0800 Subject: [PATCH] add "Gitea" application --- list.json | 10 ++++++ template/gitea/docker-compose.yml | 20 ++++++++++++ template/gitea/wizard/description/cht.md | 5 +++ template/gitea/wizard/description/eng.md | 5 +++ template/gitea/wizard/i18n/cht.json | 6 ++++ template/gitea/wizard/i18n/eng.json | 6 ++++ template/gitea/wizard/stage/install.json | 40 ++++++++++++++++++++++++ 7 files changed, 92 insertions(+) create mode 100644 template/gitea/docker-compose.yml create mode 100644 template/gitea/wizard/description/cht.md create mode 100644 template/gitea/wizard/description/eng.md create mode 100644 template/gitea/wizard/i18n/cht.json create mode 100644 template/gitea/wizard/i18n/eng.json create mode 100644 template/gitea/wizard/stage/install.json diff --git a/list.json b/list.json index 8d9e542b..a0bc5f54 100644 --- a/list.json +++ b/list.json @@ -10,6 +10,16 @@ "location": "https://hub.docker.com/r/sameersbn/gitlab/", "type": "app" }, + { + "description": "Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket, and Gitlab. Gitea is a fork of Gogs.", + "repository": "dockerhub", + "arch": "amd64", + "displayName": "Gitea", + "name": "gitea", + "version": "1.6", + "location": "https://hub.docker.com/r/gitea/gitea/", + "type": "app" + }, { "description": "Redmine is a free and open source web-based project management system.", "repository": "dockerhub", diff --git a/template/gitea/docker-compose.yml b/template/gitea/docker-compose.yml new file mode 100644 index 00000000..8c2f7509 --- /dev/null +++ b/template/gitea/docker-compose.yml @@ -0,0 +1,20 @@ +version: "2" + +networks: + gitea: + external: false + +services: + server: + image: gitea/gitea:1.6 + environment: + - USER_UID=1000 + - USER_GID=1000 + restart: always + networks: + - gitea + volumes: + - ./gitea:/data + ports: + - "3000:3000" + - "222:22" diff --git a/template/gitea/wizard/description/cht.md b/template/gitea/wizard/description/cht.md new file mode 100644 index 00000000..78336ece --- /dev/null +++ b/template/gitea/wizard/description/cht.md @@ -0,0 +1,5 @@ +## 必備條件 +如果用於團隊,您的 Docker Host 建議使用 2 核 CPU 和 1GB 記憶體。 + +## 描述 +Gitea 是一個可自行託管的 Git 服務。你可以拿 GitHub、Bitbucket 或 Gitlab 來比較看看。初期是從 Gogs 發展而來,不過我們已經 Fork 並且命名為 Gitea。 diff --git a/template/gitea/wizard/description/eng.md b/template/gitea/wizard/description/eng.md new file mode 100644 index 00000000..e7dca5b5 --- /dev/null +++ b/template/gitea/wizard/description/eng.md @@ -0,0 +1,5 @@ +## Prerequisites +Your docker host needs to have 2 CPU cores and 1GB RAM is typically sufficient for small teams/projects. + +## Description +Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket, and Gitlab. Gitea is a fork of Gogs. diff --git a/template/gitea/wizard/i18n/cht.json b/template/gitea/wizard/i18n/cht.json new file mode 100644 index 00000000..0a861292 --- /dev/null +++ b/template/gitea/wizard/i18n/cht.json @@ -0,0 +1,6 @@ +{ + "GITEA_NAME": "Gitea", + "GITEA_CONFIGURE": "設定 Gitea", + "GITEA_WEB_HOST_PORT_DESC": "設定 Gitea 網頁伺服器的 Port,預設是 3000。", + "GITEA_SSH_HOST_PORT_DESC": "設定 Gitea SSH 伺服器的 Port,預設是 222。
HTTP Port 和 SSH Port 的設定不可相同。
" +} diff --git a/template/gitea/wizard/i18n/eng.json b/template/gitea/wizard/i18n/eng.json new file mode 100644 index 00000000..4273284f --- /dev/null +++ b/template/gitea/wizard/i18n/eng.json @@ -0,0 +1,6 @@ +{ + "GITEA_NAME": "Gitea", + "GITEA_CONFIGURE": "Configure Gitea", + "GITEA_WEB_HOST_PORT_DESC": "The port of the Gitea server. Defaults to 3000.", + "GITEA_SSH_HOST_PORT_DESC": "The ssh port number. Defaults to 222.
Please note that HTTP Port and SSH Port must be different.
" +} diff --git a/template/gitea/wizard/stage/install.json b/template/gitea/wizard/stage/install.json new file mode 100644 index 00000000..a5a51ba2 --- /dev/null +++ b/template/gitea/wizard/stage/install.json @@ -0,0 +1,40 @@ +{ + "api_version": "v1", + "title": "{{GITEA_NAME}}", + "wizard": [ + { + "title": "{{GITEA_CONFIGURE}}", + "schema": { + "http_port": { + "type": "integer", + "title": "HTTP Port", + "description": "{{GITEA_WEB_HOST_PORT_DESC}}", + "required": true, + "maximum": 65535 + }, + "ssh_port": { + "type": "integer", + "title": "SSH Port", + "description": "{{GITEA_SSH_HOST_PORT_DESC}}", + "required": true, + "maximum": 65535 + } + }, + "form": [ + "*" + ] + } + ], + "binding": { + "type": "yaml", + "file": "docker-compose.yml", + "data": { + "http_port": [ + "services.server.ports[0]" + ], + "ssh_port": [ + "services.server.ports[1]" + ] + } + } +}