Skip to content

Installation (server)

Server installation allows for CI integration. The server is provided as a Docker image.

Docker Compose

Example docker-compose.yml:

services:
    app:
        image: mrras/code-observer:0.5.2
        container_name: code-observer
        ports:
            - "8080:8080" # Update this to your desired port ('external:internal', where 'internal' needs to be 8080)
        volumes:
            - YourLocationHere:/data # Update this to where you'd like to store the data
        environment:
            - DB_PATH=/data/app.db
        restart: unless-stopped

Now start the server with docker-compose up -d. The default user account is admin with password admin.

CLI tool

The CLI tool feeds data to the server.

Prerequisites

  1. Java 17+ needs to be available.
  2. GitHub CLI needs to be available.

These are both preinstalled on GitHub-hosted runners.

Example workflow

.github/workflows/codeobserver.yml:

name: CodeObserver

on:
  push:
      branches: [main]
  workflow_dispatch:

jobs:
  observe:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: CodeObserver
        uses: jacobras/CodeObserver@v0
        timeout-minutes: 5
        with:
          command: measure
          server: ${{ secrets.CODEOBSERVER_SERVER_URL }}
          project: your-project-id