Skip to content

simple docker setup with an example config#3775

Closed
digitaladapt wants to merge 30 commits into
anuraghazra:masterfrom
digitaladapt:main
Closed

simple docker setup with an example config#3775
digitaladapt wants to merge 30 commits into
anuraghazra:masterfrom
digitaladapt:main

Conversation

@digitaladapt

Copy link
Copy Markdown

I've been updating my personal setup to have everything managed in containers, for easier management, and thought I'd share.

The main piece is the Dockerfile, along with a very minor tweak to the express.js to allow it to gracefully close when requested.

I've included a simple walk-through and example config files to make it as straight forward as possible.

@vercel

vercel Bot commented May 24, 2024

Copy link
Copy Markdown

@digitaladapt is attempting to deploy a commit to the github readme stats Team on Vercel.

A member of the Team first needs to authorize it.

@LockedThread

Copy link
Copy Markdown

Just what I was looking for! Thanks.

maxh33 added a commit to maxh33/github-readme-stats that referenced this pull request Dec 12, 2025
Addresses common Docker deployment issues with detailed solutions:

Problem Areas Covered:
- Import path resolution errors (../../themes vs ../themes)
- Missing dependencies in package.json
- Docker build context configuration
- Node version mismatches (Node 18 vs 22)
- Husky/pre-commit hook conflicts in containers
- Entry point and working directory issues

Solutions Include:
- Root cause analysis for each issue
- Before/after code examples
- Step-by-step fix instructions
- File structure diagrams
- Testing verification steps

Value:
- Helps users with ANY Docker setup
- Real-world tested solutions
- Complements existing Docker efforts (PR anuraghazra#3775)
- Reduces support burden with comprehensive troubleshooting

Testing:
- Production deployment verified
- No container restart loops
- Comprehensive troubleshooting solutions
@maxh33

maxh33 commented Dec 12, 2025

Copy link
Copy Markdown

Hi @digitaladapt! 👋

I've been working on deploying github-readme-stats via Docker to solve the rate-limiting issues on my VPS, and your PR has been incredibly helpful as a reference.

I just submitted PR #4695 with comprehensive Docker troubleshooting documentation that might complement your work here. Through production deployment, I encountered and documented solutions for several common issues:

  • Import path resolution (../../themes vs ../themes)
  • Missing dependencies in package.json
  • Node version mismatches
  • Husky/pre-commit hook conflicts
  • Build context configuration

Production Enhancements I've Implemented:

If you're interested, I'd be happy to collaborate or share approaches for:

  1. Multi-stage build optimization - Separating deps/builder/runner stages for smaller images
  2. Security hardening - Non-root user (UID 1001), read-only filesystem, minimal capabilities
  3. Resource constraints - CPU/memory limits for production stability
  4. Health checks - Integrated with Traefik for zero-downtime deployments
  5. Environment variable configuration - Making configs portable (no hardcoded domains/ports)
  6. CI/CD pipeline - GitHub Actions workflow for automated build/deploy

My deployment is currently running in production successfully (all 242 tests passing, auto-restarts via Watchtower, SSL via Traefik).

Would you be interested in incorporating any of these patterns into your PR? Or would you prefer I submit enhancements separately after your base Docker support merges? Happy to collaborate however works best!

Thanks for pioneering Docker support for this project! 🚀

@martin-mfg

Copy link
Copy Markdown
Collaborator

Hi @digitaladapt, if your goal is to have a stable deployment of github-readme-stats, please take a look at #3851 (comment). I.e. development of github-readme-stats has moved to stats-organization/github-stats-extended, and the Vercel deployment of that extended version of the project doesn't have any downtimes.

If maintaining your own Docker instance of github-readme-stats is simply a fun project, carry on and have fun! :)

@digitaladapt

Copy link
Copy Markdown
Author

Hi @martin-mfg, my goal was making trivial for someone to run their own instance of the github-stats via docker (mostly because I prefer to manage my services via docker).

I had originally hoped to get it merged back in, but maybe a better way forward would be to help get the stats-organization/github-stats-extended version to produce a docker image; if you're open to collaborating on that.

It's on Docker Hub, if you'd like to take a look: hub.docker.com/r/digitaladapt/github-readme-stats

@martin-mfg

Copy link
Copy Markdown
Collaborator

I had originally hoped to get it merged back in, but maybe a better way forward would be to help get the stats-organization/github-stats-extended version to produce a docker image; if you're open to collaborating on that.

Yes, would be great to collaborate on this. Apart from the initial setup, how much continued maintenance work do you expect for the Docker image, and would you be willing to contribute to this maintenance in the future?

@digitaladapt

Copy link
Copy Markdown
Author

I'm going to close this PR, so I can switch over to working on a fork of stats-organization/github-stats-extended.

To answer your question @martin-mfg once we've reached the point of something like a GitHub Action successfully pushing a functional Docker image somewhere like Docker Hub, it should only need maintenance if there are breaking changes to the code, or operational maintenance such as changing of access tokens; and I'm happy to manage things like to that.

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.

4 participants