diff --git a/.travis.yml b/.travis.yml index 08b6eff..4c1bd2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ env: - DOCKERFILE_DIR=nginx - DOCKERFILE_DIR=redis - DOCKERFILE_DIR=httpd + - DOCKERFILE_DIR=cgit script: - cd $DOCKERFILE_DIR diff --git a/cgit/Dockerfile b/cgit/Dockerfile new file mode 100644 index 0000000..78dd45a --- /dev/null +++ b/cgit/Dockerfile @@ -0,0 +1,9 @@ +FROM clearlinux/httpd + +ARG swupd_args +RUN swupd update $swupd_args +RUN swupd bundle-add sudo curl scm-server $swupd_args +RUN rm -rf /var/lib/swupd + +COPY cgitrc /etc/cgitrc +COPY httpd-cgit.conf /etc/httpd/conf.d/httpd-cgit.conf diff --git a/cgit/README.md b/cgit/README.md new file mode 100644 index 0000000..c6f52cc --- /dev/null +++ b/cgit/README.md @@ -0,0 +1,27 @@ +# cgit +========== +This provides a Clear Linux* cgit service + +Build +----- +``` +docker build -t clearlinux/cgit . +``` + +Or just pull it from Dockerhub +--------------------------- +``` +docker pull clearlinux/cgit +``` + +Start cgit Container +----------------------- +``` +docker run -p 80:80 -v :/var/www/cgit clearlinux/cgit +``` + +Extra Build ARGs +---------------- +- ``swupd_args`` Specifies [SWUPD](https://clearlinux.org/documentation/swupdate_how_to_run_the_updater.html) flags + +Default build args in Docker are on: https://docs.docker.com/engine/reference/builder/#arg diff --git a/cgit/cgitrc b/cgit/cgitrc new file mode 100644 index 0000000..3150bf6 --- /dev/null +++ b/cgit/cgitrc @@ -0,0 +1,6 @@ +scan-path=/var/www/cgit/ +cache-scanrc-ttl=1 + +css=/cgit-data/cgit.css +logo=/cgit-data/cgit.png +favicon=/cgit-data/favicon.ico diff --git a/cgit/httpd-cgit.conf b/cgit/httpd-cgit.conf new file mode 100644 index 0000000..907ad59 --- /dev/null +++ b/cgit/httpd-cgit.conf @@ -0,0 +1,31 @@ +# set server name to start httpd from docker +ServerName localhost + +DocumentRoot "/var/www" + + Options Indexes FollowSymLinks + AllowOverride None + Require all granted + + +# cgid module is required to run the cgit binary +LoadModule cgid_module lib/httpd/modules/mod_cgid.so + + ScriptSock /var/run/cgid.sock + + +# Path to cgit stylesheet, graphics +Alias /cgit-data /usr/share/cgit + + AllowOverride None + Options None + Require all granted + + +# Path to cgit binary +ScriptAlias /cgit /usr/libexec/cgit/cgi-bin/cgit + + AllowOverride None + Options None + Require all granted +