diff --git a/templates/gitea/0/Readme.md b/templates/gitea/0/Readme.md new file mode 100644 index 0000000..7efe854 --- /dev/null +++ b/templates/gitea/0/Readme.md @@ -0,0 +1,20 @@ +# Gitea - Git with a cup of tea + +> A painless self-hosted Git service. + +Gitea is a community managed fork of Gogs, lightweight code hosting solution written in Go and published under the MIT license. + +## Installation + +Note the mysql-root password from below, you will need it during installation. + +When launching Gitea for the first time, you will greeted with an installer. You'll need to change two things: + +* The database settings: + * Username: `root` + * Password: the previously mentioned password + * Database: `gitea` + * Database Host: `db:3306` +* Change the domain name to the one you use to access Gitea +* Change the public ssh port to the one you defined earlier if you want to enable ssh +* Change the public URL to the one you defined previously, this is needed to access Gitea's web UI. diff --git a/templates/gitea/0/docker-compose.yml.tpl b/templates/gitea/0/docker-compose.yml.tpl new file mode 100644 index 0000000..6b4533e --- /dev/null +++ b/templates/gitea/0/docker-compose.yml.tpl @@ -0,0 +1,34 @@ +version: '2' +services: + gitea: + image: gitea/gitea:1.3.0 + volumes: + - gitea-data:/data + +{{- if ne .Values.db_link ""}} + external_links: + - ${db_link}:db +{{- else}} + links: + - db:db + db: + image: mariadb:10 + environment: + MYSQL_ROOT_PASSWORD: ${mysql_password} + MYSQL_DATABASE: 'gitea' + volumes: + - gitea-db:/var/lib/mysql +{{- end}} + lb: + image: rancher/lb-service-haproxy:v0.7.9 + ports: + - ${http_port}:${http_port}/tcp + - ${ssh_port}:${ssh_port}/tcp +volumes: + gitea-data: + driver: ${volume_driver} +{{- if eq .Values.db_link ""}} + gitea-db: + driver: ${volume_driver} +{{- end}} + diff --git a/templates/gitea/0/rancher-compose.yml b/templates/gitea/0/rancher-compose.yml new file mode 100644 index 0000000..f3f7a99 --- /dev/null +++ b/templates/gitea/0/rancher-compose.yml @@ -0,0 +1,82 @@ +version: '2' +catalog: + name: "Gitea" + version: "v1.3" + description: "A painless self-hosted Git service." + uuid: gitea-0 + minimum_rancher_version: v0.56.0 + maintainer: "Konrad Langenberg " + questions: + - variable: http_port + description: "Public HTTP port to access Gitea's webui." + label: "HTTP Port" + required: true + default: "3000" + type: "int" + - variable: ssh_port + description: "Public ssh port to clone repositories via ssh." + label: "SSH Port" + required: true + default: "2222" + type: "int" + - variable: "volume_driver" + description: "Volume driver to associate with this service." + label: "Volume Driver" + required: true + default: "local" + type: enum + options: # List of options if using type of `enum` + - local + - rancher-nfs + - rancher-efs + - rancher-ebs + - variable: "db_link" + description: "External DB service to use with gitea instead of its own DB-Container." + label: "External DB service" + default: "" + required: false + type: "service" + - variable: mysql_password + description: "MySQL root password to use for Gitea." + label: "MySQL Password" + required: true + default: "default_pass" + type: "password" +services: + gitea: + scale: 1 + retain_ip: true + health_check: + response_timeout: 2000 + healthy_threshold: 2 + port: 3000 + unhealthy_threshold: 3 + initializing_timeout: 300000 + interval: 2000 + strategy: recreate + request_line: GET "/" "HTTP/1.0" + reinitializing_timeout: 120000 + lb: + scale: 1 + start_on_create: true + lb_config: + certs: [] + port_rules: + - priority: 1 + protocol: http + service: gitea + source_port: ${http_port} + target_port: 3000 + - priority: 2 + protocol: tcp + service: gitea + source_port: ${ssh_port} + target_port: 22 + health_check: + response_timeout: 2000 + healthy_threshold: 2 + port: 42 + unhealthy_threshold: 3 + initializing_timeout: 60000 + interval: 2000 + reinitializing_timeout: 60000 diff --git a/templates/gitea/catalogIcon-gitea.svg b/templates/gitea/catalogIcon-gitea.svg new file mode 100644 index 0000000..ac1594a --- /dev/null +++ b/templates/gitea/catalogIcon-gitea.svg @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/gitea/config.yml b/templates/gitea/config.yml new file mode 100644 index 0000000..fecfd1a --- /dev/null +++ b/templates/gitea/config.yml @@ -0,0 +1,5 @@ +name: Gitea +description: | + A painless self-hosted Git service +version: v1.3 +category: Git