Overview
Installing
Configuration

Installing - Windows

CodeHistory is a Spring Boot Application and can be deployed in any way available for Spring Boot.

1. Check your version of Java

java -version

The version of Java should be 1.8.x or higher. If you don't see a supported version of Java, then download and install the Oracle JVM (JDK or JRE), or OpenJDK.

2. Download

Download the CodeHistory zip package and unzip the contents to any folder where you would like to host your web server (for example: C:\Program Files\CodeHistory).

3. Configuration

Set values in json config or environment variables to initialize and index your repository.
For example: config.json for an open-source PDFBox repository:

{
  "REPO_PATH": "pdfbox",
  "REPO_URL": "https://github.com/apache/pdfbox",
  "REPO_FOLLOW_URL": "https://github.com/apache/pdfbox"
  "REPO_TYPE": "GITHUB",
  "REPO_COMMIT_URL_TEMPLATE": "%s/commit/%s",
  "ISSUE_TRACKER_TYPE": "JIRA",
  "ISSUE_TRACKER_URL": "https://issues.apache.org/jira",
  "DEFAULT_BRANCH": 'refs/remotes/origin/master',
}

To change the launch parameters, edit config_example.json. See Configuration - Options for available parameters.

4. Register as a Service

Register CodeHistory as a service. All methods described in the documentation are supported: Installing Spring Boot Applications - Microsoft Windows Services.

Let's look at an example of registering via winsw. The CodeHistory zip file contains an example configuration:

<service>
  <id>codehistory</id>
  <name>CodeHistory Service</name>
  <description>CodeHistory - Git web interface with powerful search and semantic history of source code</description>
  <executable>java</executable>
  <arguments>-jar "codehistory.jar" config_example.json</arguments>
</service>

To change the launch parameters, edit config_example.json. See [Configuration Options] for available parameters details.

Download winsw executable from releases section and rename it to codehistory.exe (as required by winsw - Use WinSW as a bundled tool).

Then unpack codehistory.zip, copy renamed winsw executable (codehistory.exe>) and install the service:

codehistory.exe install

After that, the service can be launched through the services control panel (services.msc).

To uninstall CodeHistory service:

codehistory.exe uninstall