minimal-git-server

Deploy a minimal, self-hosted git server using Docker or Podman. Manage repositories and user accounts easily with a simple command-line interface.

Run a personal, lightweight Git server directly within a container. This tool provides a straightforward way to self-host your repositories using Docker or Podman, configured entirely through a single YAML file. It is designed for simplicity and ease of use, making it ideal for automation and scripting.

Manage your development workflow with a basic but effective command-line interface. You can create, list, rename, and remove repositories by simply logging in via SSH. The server is built to be easily integrated into your existing scripts for automated repository management.

Key features include:

  • Container-based deployment: Runs seamlessly on Docker and Podman.
  • Multi-account support: Configure multiple users with individual SSH public keys.
  • Simple CLI management: Handle all repository tasks through SSH commands.
  • Easy scripting: Embed management commands directly into your automation scripts.
  • Persistent storage: Uses mounted volumes to persist server keys and repository data.

Directory Structure

minimal-git-server
git-data
ssh-keys
.env
docker-compose.yml

docker-compose.yml

services:
  git-server:
    image: ghcr.io/mcarbonne/minimal-git-server:latest
    container_name: minimal-git-server
    restart: unless-stopped
    ports:
      - "2222:22"
      - "8080:80"
    volumes:
      - ./git-data:/git
      - ./ssh-keys:/root/.ssh
    environment:
      - GIT_ADMIN_USERNAME=${GIT_ADMIN_USERNAME}
      - GIT_ADMIN_PASSWORD=${GIT_ADMIN_PASSWORD}

.env

GIT_ADMIN_USERNAME=admin
GIT_ADMIN_PASSWORD=your_super_secret_password
Categories:

Share:

Ad
Favicon

 

  
 

Similar to minimal-git-server

Favicon

 

  
  
Favicon

 

  
  
Favicon