- Start opengrok server and limit the cpu usage of opengrok indexer.
- Period of automatic mirroring/reindexing (10min).
- The volume mounted to ~/Projects should contain the projects you want to make searchable.
- Open http://127.0.0.1:8080 to enjoy.
$ sudo docker run -d --cpus="1.0" \
--name opengrok \
-p 8080:8080/tcp \
-e REINDEX="10" \
-v ~/Projects:/opengrok/src/ \
opengrok/docker:1.3
- You can avoid to sync source code from upstream.
$ sudo docker exec -it opengrok sed -i 's/opengrok-mirror/#opengrok-mirror/g' /scripts/index.sh
- You can manually trigger an reindex using docker exec.
$ sudo docker exec -it opengrok /scripts/index.sh
$ git clone https://github.com/RainMark/opengrok-restful.git ~/opengrok-restful
- Emacs config.
;; opengrok-restful
(add-to-list 'load-path "~/opengrok-restful")
(require 'opengrok-restful)
(setq opengrok-restful-source-directory "~/Projects")
(global-set-key (kbd "M-d") 'opengrok-restful-lookup-def)
(global-set-key (kbd "M-f") 'opengrok-restful-lookup-full)
(global-set-key (kbd "M-s") 'opengrok-restful-lookup-symbol)
(global-set-key (kbd "M-p") 'opengrok-restful-lookup-path)
- When you lookup symbol with opengrok-restful, Input nothing to lookup all projects that indexed, Input ‘c’ to lookup current project.