You must setup Podman and Cloudflared first.

Steps

  1. create git-server directory in $HOME/podman
    mkdir -p ~/podman/git-server && cd ~/podman/git-server
    
  2. copy from compose.yml
    nano compose.yml
    
  3. copy from config.env
    nano config.env
    
  4. start git-server
    podman-compose -f ~/podman/git-server/compose.yml systemd -a register
    systemctl --user enable --now podman-compose@git-server
    

compose.yml

version: "3"
services:
  git-server:
    image: docker.io/heinokesoe/git-server:latest
    container_name: git-server
    env_file:
      - ./config.env
    networks:
      - traefik
    ports:
      - "22:22"
      - "127.0.0.1:1344:8080"
    volumes:
      - ./ssh:/etc/ssh
      - ./data:/var/lib/git
    restart: unless-stopped
    labels:
      - "io.containers.autoupdate=registry"
networks:
  traefik:
    external: true

config.env

SSH_KEY=
SSH_KEY_NAME=
CGIT_CLONE_PREFIX=https://git.example.com ssh://[email protected]
#CGIT_ROOT_TITLE=
#CGIT_ROOT_DESCRIPTION=