HUB
Sign inSign up

swtnk/github-insights

By swtnk

•Updated 11 months ago

A comprehensive analytics dashboard for visualizing GitHub contributions, issues, and pull requests.

Image
Developer tools
Monitoring & observability
Web analytics
0

545

swtnk/github-insights repository overview

⁠GitHub Insights

A comprehensive analytics dashboard for visualizing GitHub contributions, issues, and pull requests. This containerized application combines a Spring Boot backend with a React frontend, served through Nginx for optimal performance.

⁠Quick Start

docker run -d \
  --name github-insights \
  -p 8000:80 \
  -e GITHUB_TOKEN=your_github_token_here \
  swtnk/github-insights:latest

Access the application at http://localhost:8000⁠

⁠Features

  • 📊 Dashboard Analytics - Overview of your GitHub activity
  • 🐛 Issues Tracking - View and filter issues with detailed metrics
  • 🔀 Pull Requests - Monitor PR status and contributions
  • 📦 Repository Insights - Track repository contributions and statistics
  • 🔍 Advanced Filtering - Filter by date range, username, and status
  • 💾 Intelligent Caching - Reduce API calls with smart caching
  • 🎨 Dark/Light Mode - Comfortable viewing experience

⁠Supported Tags

  • latest - Latest stable release
  • 1.0.0 - Version 1.0.0

⁠Supported Architectures

  • linux/amd64 - Intel/AMD 64-bit
  • linux/arm64 - ARM 64-bit (Apple Silicon, AWS Graviton, etc.)

⁠What's Inside

This image combines multiple components in a single, optimized container:

  • Backend: Spring Boot 3.5.9 with Java 25
  • Frontend: React 18 with TypeScript
  • Web Server: Nginx (reverse proxy)
  • Process Manager: Supervisor

Built using a multi-stage Docker build for minimal image size (~350MB).

⁠Environment Variables

⁠Required
VariableDescription
GITHUB_TOKENGitHub Personal Access Token with repo and user permissions
⁠Optional
VariableDefaultDescription
SPRING_PROFILES_ACTIVEprodSpring profile (prod/local/dev)
JAVA_OPTS-Xmx512m -Xms256mJVM memory options

⁠Getting Your GitHub Token

  1. Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
  2. Click "Generate new token (classic)"
  3. Select scopes: repo (Full control of private repositories) and user (Read user profile data)
  4. Generate and copy the token

⁠Usage Examples

⁠Basic Usage
docker run -d \
  --name github-insights \
  -p 8000:80 \
  -e GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx \
  swtnk/github-insights:latest
⁠With Custom Port
docker run -d \
  --name github-insights \
  -p 3000:80 \
  -e GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx \
  swtnk/github-insights:latest
⁠With Custom JVM Settings
docker run -d \
  --name github-insights \
  -p 8000:80 \
  -e GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx \
  -e JAVA_OPTS="-Xmx1g -Xms512m" \
  swtnk/github-insights:latest
⁠Using Docker Compose
version: '3.8'

services:
  github-insights:
    image: swtnk/github-insights:latest
    container_name: github-insights
    ports:
      - "8000:80"
    environment:
      - GITHUB_TOKEN=${GITHUB_TOKEN}
      - SPRING_PROFILES_ACTIVE=prod
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:80/"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s

⁠Exposed Ports

PortDescription
80Main HTTP port (Nginx serves frontend and proxies backend)

⁠Endpoints

Once running, access these URLs:

  • Frontend: http://localhost:8000/
  • API: http://localhost:8000/github-insights
  • Swagger UI: http://localhost:8000/github-insights/swagger-ui.html
  • Health Check: http://localhost:8000/github-insights/actuator/health

⁠Health Check

The container includes a built-in health check that verifies the application is running:

docker inspect --format='{{json .State.Health}}' github-insights

⁠Logs

View application logs:

# All logs
docker logs github-insights

# Follow logs
docker logs -f github-insights

# Last 100 lines
docker logs --tail 100 github-insights

⁠Volumes

The application doesn't require persistent volumes, as caching is managed in-memory. However, you can optionally mount a cache directory:

docker run -d \
  --name github-insights \
  -p 8000:80 \
  -e GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx \
  -v $(pwd)/cache:/app/cache \
  swtnk/github-insights:latest

⁠Performance Tuning

⁠Memory Settings

Adjust JVM memory based on your needs:

# Light usage (default)
-e JAVA_OPTS="-Xmx512m -Xms256m"

# Medium usage
-e JAVA_OPTS="-Xmx1g -Xms512m"

# Heavy usage
-e JAVA_OPTS="-Xmx2g -Xms1g"
⁠Restart Policy
docker run -d \
  --name github-insights \
  --restart unless-stopped \
  -p 8000:80 \
  -e GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx \
  swtnk/github-insights:latest

⁠Security

  • Runs backend as non-root user (appuser)
  • Uses minimal Alpine Linux base images
  • Only exposes necessary port (80)
  • Token passed as environment variable (not in image)

⁠Troubleshooting

⁠Container won't start

Check logs:

docker logs github-insights
⁠Cannot connect to GitHub API

Verify your token:

docker exec github-insights env | grep GITHUB_TOKEN

Test token manually:

curl -H "Authorization: Bearer YOUR_TOKEN" https://api.github.com/user
⁠High memory usage

Reduce JVM memory:

docker stop github-insights
docker rm github-insights
docker run -d --name github-insights -p 8000:80 \
  -e GITHUB_TOKEN=your_token \
  -e JAVA_OPTS="-Xmx256m -Xms128m" \
  swtnk/github-insights:latest

⁠Source Code

GitHub: https://github.com/swtnk-sbhm/github-insights⁠

⁠License

MIT License

⁠Support

For issues and questions:


Note: This is a community project. Make sure to review the code and understand what data is being accessed with your GitHub token.

Tag summary
Recent tags
Content type
Image
Digest
sha256:a3fa83126…
Size
169.2 MB
Last updated
11 months ago
docker pull swtnk/github-insights:latest