Searchcode Server Community Deploy

Searchcode Server Community Deploy

introduction

https://searchcode.com

query syntax

https://searchcode.com/#jumbo-examples

requirement

installation

# download jre package from java archive website
rpm -ivh jre-8u65-linux-x64.rpm
wget https://searchcode.com/static/searchcode-server-community.tar.gz
tar xf searchcode-server-community.tar.gz
searchcode-server-community/release
java -jar searchcode-1.0.0.jar

visit http://yourserverip:8080/

use my docker image

fresh image auto-build and keep fresh, depend on author’s api

docker run -p 8080:8080 -d docker.io/arkii/searchcode-server-community

run image directly

docker run -p 8080:8080 -d docker.io/arkii/searchcode-server

or run image with docker-compose
docker-compose.yml

searchcode:
image: arkii/searchcode-server
volumes:
- /db/searchcode/git/index:/srv/index
- /db/searchcode/git/repo:/srv/repo
- /db/searchcode/git/searchcode.properties:/srv/searchcode.properties
- /db/searchcode/git/searchcode.sqlite:/srv/searchcode.sqlite
ports:
- "8080:8080/tcp"

visit http://yourdockerserverip:8080/

To administer your searchcode server instance you need to click on the Admin link in the top right.
Enter the default password Adm1n234

Dockerfiles

build JRE 8u65 image

FROM centos:6
MAINTAINER Arkii sqy6@163.com
COPY ./jre-8u65-linux-x64.rpm /tmp/jre-8u65-linux-x64.rpm
RUN rpm -ivh /tmp/jre-8u65-linux-x64.rpm && rm -f /tmp/jre-8u65-linux-x64.rpm

build Searchcode Server Community 1.0.0 image

FROM arkii/centos6-jre-8u65
MAINTAINER Arkii sqy6@163.com
COPY ./searchcode-server-community/release /srv
WORKDIR /srv
CMD /usr/bin/java -jar searchcode-1.0.0.jar
EXPOSE 8080/tcp