summaryrefslogtreecommitdiff
path: root/README
blob: c37fae2a80d12c59f2455805a9e84af10d120fcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
CGIT-CADDY CONTAINER

Build:
    podman build -t cgit-caddy .

Run (first time or after changes):
    ./start_container.sh

Run (manual):
    podman run -d \
        --name cgit \
        --network public-routed \
        --ip 10.89.0.2 \
        --cap-add=NET_ADMIN \
        --env-file config.env \
        -v cgit_data:/data \
        -v /git:/git \
        localhost/cgit-caddy

    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

Restart:
    podman restart cgit

Stop:
    podman stop cgit && podman rm cgit && ip route del 37.27.166.242/32

Cleanup (remove everything):
    podman stop cgit
    podman rm cgit
    podman volume rm cgit_data
    ip route del 37.27.166.242/32
    podman network rm public-routed    # only if no other containers use it

Logs:
    podman logs -f cgit

Shell:
    podman exec -it cgit sh

Create repo:
    git init --bare /git/myrepo