Skip to content

feat: Add Docker support #804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

robbeverhelst
Copy link

@robbeverhelst robbeverhelst commented Jun 23, 2025

Description

This PR adds Docker support to enable easy self-hosting of GitHub Readme Streak Stats. The implementation provides a production-ready, secure Dockerfile with
minimal changes to the codebase, addressing community requests for containerized deployment options.

Fixes #622

Type of change

  • New feature (added a non-breaking change which adds functionality)
  • Updated documentation (updated the readme, templates, or other repo files)

How Has This Been Tested?

  • Tested locally with a valid username
  • Tested locally with an invalid username
  • Successfully deployed to production Kubernetes cluster
  • Verified all features work including PNG rendering with Inkscape
  • Tested on both ARM64 and x86_64 architectures

Live demo available at: https://streak-stats.robbeverhelst.com/demo/

Checklist:

  • I have checked to make sure no other pull requests
    are open for this issue
  • The code is properly formatted and is consistent with the existing code style
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Additional Notes

  • Kept changes minimal (2 files) based on feedback from Added Docker Support and Heroku Nginx. #322
  • Dockerfile includes security best practices:
    • Disabled directory indexing
    • Security headers (X-Content-Type-Options, X-Frame-Options)
    • Minimal attack surface with --no-install-recommends
    • Proper file permissions
  • Full feature compatibility including SVG and PNG rendering
  • Kubernetes manifests available for separate PR if desired

@ildyria
Copy link

ildyria commented Jun 24, 2025

@robbeverhelst Great job ! I also improved a bit on your docker image by pinning the versions. Tested locally to work.

@robbeverhelst
Copy link
Author

Thx @ildyria! I resolved your comments!

@robbeverhelst robbeverhelst requested a review from ildyria June 24, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Docker image
2 participants