From 7bd52ea1ae10870cc2ff8aa5c237679c30ffda72 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 29 Dec 2025 20:01:17 +0800 Subject: ssh keyfiles support --- README | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'README') diff --git a/README b/README index 99ecf57..c71655b 100644 --- a/README +++ b/README @@ -1,12 +1,11 @@ -CGIT-CADDY CONTAINER +CGIT CONTAINER Cgit with automatic HTTPS (cgit + caddy + Let's Encrypt). Requirements: - - Public IPv4 address pointed to this machine - - /git directory on host for bare git repos - - Domain name pointing to the public IP -TLS certificates are auto-generated by Caddy and stored in a container volume. + - Public IPv4 address + - Domain pointing to the IP + - /git directory for bare repos Host setup (one-time): cat > /etc/sysctl.d/99-container-routing.conf << 'EOF' @@ -14,12 +13,9 @@ Host setup (one-time): net.ipv4.conf.enp1s0.proxy_arp=1 EOF sysctl -p /etc/sysctl.d/99-container-routing.conf - mkdir -p /git + mkdir -p /git/.ssh -Build: - podman build -t cgit-caddy . - -Run (first time or after changes): +Run: ./start_container.sh Run (manual): @@ -31,19 +27,25 @@ Run (manual): --env-file config.env \ -v cgit_data:/data \ -v /git:/git \ - localhost/cgit-caddy + localhost/cgit sleep 2 podman exec cgit ip addr add 37.27.166.242/32 dev eth0 ip route add 37.27.166.242/32 via 10.89.0.2 +SSH keys: + Drop .pub files in /git/.ssh/, they're combined into authorized_keys on run. + +Create repo: + git init --bare /git/myrepo + Restart: podman restart cgit Stop: podman stop cgit && podman rm cgit && ip route del 37.27.166.242/32 -Cleanup (remove everything): +Cleanup: podman stop cgit podman rm cgit podman volume rm cgit_data @@ -55,6 +57,3 @@ Logs: Shell: podman exec -it cgit sh - -Create repo: - git init --bare /git/myrepo -- cgit v1.2.3