diff options
| author | Your Name <you@example.com> | 2025-12-29 18:28:13 +0800 |
|---|---|---|
| committer | Your Name <you@example.com> | 2025-12-29 18:28:13 +0800 |
| commit | 214f4bab8b852e9b66d909bc22e5f9119da7dfb5 (patch) | |
| tree | ee970b0f1738e5e08afe24247305be2defb27735 /README | |
initial commit
Diffstat (limited to 'README')
| -rw-r--r-- | README | 44 |
1 files changed, 44 insertions, 0 deletions
| @@ -0,0 +1,44 @@ | |||
| 1 | CGIT-CADDY CONTAINER | ||
| 2 | |||
| 3 | Build: | ||
| 4 | podman build -t cgit-caddy . | ||
| 5 | |||
| 6 | Run (first time or after changes): | ||
| 7 | ./start_container.sh | ||
| 8 | |||
| 9 | Run (manual): | ||
| 10 | podman run -d \ | ||
| 11 | --name cgit \ | ||
| 12 | --network public-routed \ | ||
| 13 | --ip 10.89.0.2 \ | ||
| 14 | --cap-add=NET_ADMIN \ | ||
| 15 | --env-file config.env \ | ||
| 16 | -v cgit_data:/data \ | ||
| 17 | -v /git:/git \ | ||
| 18 | localhost/cgit-caddy | ||
| 19 | |||
| 20 | sleep 2 | ||
| 21 | podman exec cgit ip addr add 37.27.166.242/32 dev eth0 | ||
| 22 | ip route add 37.27.166.242/32 via 10.89.0.2 | ||
| 23 | |||
| 24 | Restart: | ||
| 25 | podman restart cgit | ||
| 26 | |||
| 27 | Stop: | ||
| 28 | podman stop cgit && podman rm cgit && ip route del 37.27.166.242/32 | ||
| 29 | |||
| 30 | Cleanup (remove everything): | ||
| 31 | podman stop cgit | ||
| 32 | podman rm cgit | ||
| 33 | podman volume rm cgit_data | ||
| 34 | ip route del 37.27.166.242/32 | ||
| 35 | podman network rm public-routed # only if no other containers use it | ||
| 36 | |||
| 37 | Logs: | ||
| 38 | podman logs -f cgit | ||
| 39 | |||
| 40 | Shell: | ||
| 41 | podman exec -it cgit sh | ||
| 42 | |||
| 43 | Create repo: | ||
| 44 | git init --bare /git/myrepo | ||
