Sign inSign up

ptcookie/git-web

By ptcookie

•Updated over 1 year ago

Container image for Cgit web server

Image
Developer tools
0

1.0K

ptcookie/git-web repository overview

⁠Cgit Web Server Container

Container image for Cgit web server.

⁠Run

Make volume for git repository(and certbot certificates if use HTTPS).

docker volume create git-repository

# If uses HTTPS
# docker volume create certbot-config
# docker volume create certbot-data
podman volume create git-repository

# If uses HTTPS
# podman volume create certbot-config
# podman volume create certbot-data

Run container.

docker run -d --name git-web \
    --publish 80:80 \
    --volume git-repository:/srv/git \
    # If uses HTTPS
    #--publish 443:443 \
    #--volume certbot-config:/etc/letsencrypt \
    #--volume certbot-data:/var/lib/letsencrypt \
    git-web:latest
podman run -d --name git-web \
    --publish 80:80 \
    --volume git-repository:/srv/git \
    # If uses HTTPS
    #--publish 443:443 \
    #--volume certbot-config:/etc/letsencrypt \
    #--volume certbot-data:/var/lib/letsencrypt \
    git-web:latest

⁠Config

If you use prebuilt image, you should provide your own config and assets through volume and environment variables.

docker run -d --name git-web \
+    --env CGIT_ASSETS=/assets \
+    --env NGINX_CONFS=/nginx \
    --publish 80:80 \
    --volume git-repository:/srv/git \
+    --volume cgit-assets:/assets:ro \
+    --volume nginx-confs:/nginx:ro \
    # If uses HTTPS
    #--publish 443:443 \
    #--volume certbot-config:/etc/letsencrypt \
    #--volume certbot-data:/var/lib/letsencrypt \
    git-web:latest
podman run -d --name git-web \
+    --env CGIT_ASSETS=/assets \
+    --env NGINX_CONFS=/nginx \
    --publish 80:80 \
    --volume git-repository:/srv/git \
+    --volume cgit-assets:/assets:ro \
+    --volume nginx-confs:/nginx:ro \
    # If uses HTTPS
    #--publish 443:443 \
    #--volume certbot-config:/etc/letsencrypt \
    #--volume certbot-data:/var/lib/letsencrypt \
    git-web:latest

CGIT_ASSETS directory structure should looks like this:

app/
    cgit.png
    favicon.ico
    ...
cgitrc

NGINX_CONFS directory structure should looks like this:

conf.d/
    cgit.conf
    ...
nginx.conf # If you want to customize global Nginx config

⁠License

MIT © PtCookie⁠

Softwares in container image may be under their own licenses.

⁠Mics

Inspired by cgit-docker⁠

Tag summary

Content type

Image

Digest

sha256:a37cb4bd6…

Size

59.1 MB

Last updated

over 1 year ago

docker pull ptcookie/git-web