Sign inSign up

sskorol/github-readme-stats

By sskorol

Updated 4 months ago

Image
0

1.8K

sskorol/github-readme-stats repository overview

GitHub README stats

Docker wrapper for github-readme-stats with organization language support.

Features

  • Self-hosted github-readme-stats with Docker
  • Organization language stats - Include languages from org repos in your top languages card
  • Default username/org configuration - Access stats without query parameters
  • Multi-arch support (amd64, arm64)

Quick Start

docker run -d \
  -e PAT_1=ghp_xxxx \
  -e WHITELIST=your-username \
  -e DEFAULT_USERNAME=your-username \
  -e DEFAULT_ORGS=org1,org2 \
  -p 9000:9000 \
  sskorol/github-readme-stats:latest

Then access:

  • http://localhost:9000/api/top-langs - Top languages (includes org repos)
  • http://localhost:9000/api/stats - Stats card

Configuration

Copy .env.example to .env and configure:

cp .env.example .env
VariableRequiredDescription
PAT_1YesGitHub Personal Access Token (classic recommended for org access)
WHITELISTRecommendedComma-separated allowed usernames
DEFAULT_USERNAMENoDefault username for API endpoints
DEFAULT_ORGSNoDefault organizations for top-langs (comma-separated)
CACHE_SECONDSNoSVG cache duration (min: 7200, default: 14400)
Additional PATs

Add PAT_2, PAT_3, etc. for rate limit rotation:

PAT_1=ghp_xxxx
PAT_2=ghp_yyyy
PAT_3=ghp_zzzz

API Endpoints

Top Languages
GET /api/top-langs

Query parameters:

  • username - GitHub username (uses DEFAULT_USERNAME if not provided)
  • orgs - Comma-separated org names (uses DEFAULT_ORGS if not provided)
  • hide - Languages to hide
  • langs_count - Number of languages (1-20)
  • layout - Card layout (normal, compact, donut, donut-vertical, pie)
  • theme - Color theme

Examples:

# Use defaults
/api/top-langs

# Override orgs
/api/top-langs?orgs=microsoft,google

# Custom layout
/api/top-langs?layout=compact&langs_count=10
Stats Card
GET /api/stats

Query parameters:

  • username - GitHub username (uses DEFAULT_USERNAME if not provided)
  • show_icons - Show icons (true/false)
  • theme - Color theme
  • hide - Stats to hide

Docker Compose

services:
  github-readme-stats:
    image: sskorol/github-readme-stats:latest
    ports:
      - "9000:9000"
    env_file:
      - .env
    restart: unless-stopped

GitHub PAT Requirements

For organization repository access, use a Classic PAT with:

  • repo scope (for private repos)
  • or public_repo scope (for public repos only)

Fine-grained PATs have limited org access and may not work for all organizations.

Tag summary

Content type

Image

Digest

sha256:58777bcda

Size

52.1 MB

Last updated

4 months ago

docker pull sskorol/github-readme-stats