{"id":19796605,"url":"https://github.com/drabo/gogs","last_synced_at":"2025-05-01T03:31:00.300Z","repository":{"id":37690039,"uuid":"194887502","full_name":"drabo/gogs","owner":"drabo","description":"How to install Gogs in Kubernetes","archived":false,"fork":false,"pushed_at":"2023-06-09T07:07:16.000Z","size":249,"stargazers_count":17,"open_issues_count":2,"forks_count":8,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-06T08:13:35.941Z","etag":null,"topics":["cluster","git-server","gogs","k8s","kubernetes","minikube"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drabo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-02T15:13:21.000Z","updated_at":"2025-01-25T01:27:38.000Z","dependencies_parsed_at":"2023-01-17T16:01:46.687Z","dependency_job_id":null,"html_url":"https://github.com/drabo/gogs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drabo%2Fgogs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drabo%2Fgogs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drabo%2Fgogs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drabo%2Fgogs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drabo","download_url":"https://codeload.github.com/drabo/gogs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251817931,"owners_count":21648834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cluster","git-server","gogs","k8s","kubernetes","minikube"],"created_at":"2024-11-12T07:20:35.841Z","updated_at":"2025-05-01T03:31:00.070Z","avatar_url":"https://github.com/drabo.png","language":null,"readme":"# Install Gogs in Kubernetes #\n\nThe following installation steps will create a working Git server in Kubernetes.\n\n## Installation ##\n\nUse the script [gogs.yaml](gogs.yaml) to create all Kubernetes entities needed.\n\nRun the script with:\n\n```shell\n$ kubectl apply -f gogs.yaml\n\nnamespace/gogs created\npersistentvolumeclaim/gogs-pv-claim created\ndeployment.extensions/gogs created\nservice/gogs-svc created\n```\n\nDepending on your needs, you may want to modify:\n\n- size of the persistent volume (currently `2GB`)\n- Gogs Docker image (currently `gogs/gogs:0.13`)\n- number of replicas\n- turn the Deployment into a StatefulSet or a DaemonSet\n\n## Access to Gogs ##\n\nYou may access Gogs in 2 ways:\n\n- via web interface that is similar with Github\n- via SSH using git command line\n\nIf you use Minikube then you should add the local address of Gogs to /etc/hosts with the following command:\n\n```shell\necho -e \"\\n\"$(minikube ip)\" gogs.local\" | sudo tee -a /etc/hosts\n```\n\n### Access via web interface ###\n\nIn order to access the Gogs web interface you have the following options:\n\n- via an Ingress (uncomment the ingress section in [gogs.yaml](gogs.yaml))\n- via an Istio gateway - run the script [istio.yaml](istio.yaml) to create the Istio entities needed. For this option you will need to previously [install Istio](https://github.com/drabo/istio)\n\n```shell\n$ kubectl apply -f istio.yaml\n\ngateway.networking.istio.io/gogs-gateway created\nvirtualservice.networking.istio.io/gogs-vs created\n```\n\n#### Gogs Configuration via web interface ####\n\nAccess in your browser the link: http://gogs.local\n\n**Database Settings:**\n\nFor simplicity choose `SQLite3`\n\n![Database Settings](img/db-config.png)\n\n**Application General Settings:**\n\n- Domain: `gogs.local`\n- SSH Port: `30022`\n- HTTP Port: `3000`\n- Application URL: `http://gogs.local/`\n\n![Application General Settings](img/app-config.png)\n\n**Optional Settings:**\n\nExpand *Admin Account Settings* and create an admin user:\n\n- Username: `your-user-name`\n- Password: `your-password`\n- Email: `your-email-address` or a dummy address\n\n![Optional Settings](img/opt-config.png)\n\n\u003e :exclamation: Upload the public key to your Gogs user that will be useful for SSH access.\n\n### Access via SSH ###\n\nCreate the following entry into your `~/.ssh/config` file:\n\n```shell\nHost gogs.local\n    HostName gogs.local\n    Port 30022\n    User git\n```\n\nTest the SSH conection to Gogs:\n\n```shell\n$ ssh gogs.local\n\nWarning: Permanently added the ECDSA host key for IP address '[192.168.99.100]:30022' to the list of known hosts.\nPTY allocation request failed on channel 0\nHi there, You've successfully authenticated, but Gogs does not provide shell access.\nIf this is unexpected, please log in with password and setup Gogs under another user.\nConnection to gogs.local closed.\n```\n\nMore information about the Docker for Gogs on page https://github.com/gogs/gogs/tree/master/docker\n\n## Gogs for ARM64 ##\n\nIf you have a Kubernetes cluster running on a Raspberry Pi 4 with 8GB RAM or a server in cloud running ARM64 processor then Gogs may be installed by using the deployment script [gogs-arm64.yaml](gogs-arm64.yaml)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrabo%2Fgogs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrabo%2Fgogs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrabo%2Fgogs/lists"}