AAAASJAAAA / kooder

Kooder 是一个为 Gitee/GitLab 开发的开源代码搜索工具,这是一个镜像仓库,主仓库在 Gitee。

Home Page:https://gitee.com/koode/kooder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kooder

Intro

Kooder is a open source code search project, offering code, repositories and issues search service for code hosting platforms including Gitee, GitLab and Gitea.

UI

Kooder ScreenShot

There are two modules, gateway and indexer. Gateway is integrated inside gateway under default config.

Gateway:

  • Accept index tasks from HTTP requests and put them in the queue after examing it
  • Accept search requests and return their results back to the client

Indexer:

  • Monitor the index tasks inside the queue
  • Update these add, delete and update index tasks back to the index library

Modules

  • core Core object and public class
  • gateway Accept index and search requests from HTTP requests
  • indexer A service to construct, update and delete index

Logic Flow

Kooder Flow

Install source code

1.Dependencies

  • openjdk >= 8
  • maven > 3

2.Download source code

$ git clone https://gitee.com/koode/kooder.git
$ cd kooder

Configuration

Config file: core/src/main/resources/kooder.properties

Config kooder's url http.url. It will be injected into Git service as the webhook URL, must be accessible for Git service, such as:

http.url = http://<kooder-host>:8080

Click here to see more config options configuration.md

Install Docker

Dependencies

  • docker-ce environment
  • docker-compose

After cloning this repo, in a machine with docker compose installed, run the following command:

### Run containers in the background
docker-compose up -d 

### Stop and remove containers
docker-compose down

This is how it will look like:

Kooder docker-ha

After modifing the config file /deploy/kooder.properties, run the following commands; delete local kooder image and rebuid it.

docker rmi imageID
docker-compose up -d

Use it in Gitlab

Config following properties:

gitlab.url = http://gitlab-host:gitlab-port/  
gitlab.personal_access_token = <root user personal access token>  
git.username = root  
git.password =  

Kooder will use access token as the password if you don't offer one.

Use it in Gitee

Config following properties:

gitee.url = https://gitee.com/  
gitee.personal_access_token = <root user personal access token>  
git.username = root  
git.password =  

Kooder will use access token as the password if you don't offer one.

Build and Run

$ cd Kooder
$ mvn install
### Run gateway
$ bin/gateway.sh
### Brower visits http://localhost:8080

About

Kooder 是一个为 Gitee/GitLab 开发的开源代码搜索工具,这是一个镜像仓库,主仓库在 Gitee。

https://gitee.com/koode/kooder

License:Apache License 2.0


Languages

Language:Java 99.0%Language:Shell 0.5%Language:CSS 0.4%Language:Batchfile 0.1%Language:Dockerfile 0.1%Language:Lex 0.0%