summaryrefslogtreecommitdiffstats
path: root/cgit
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2023-09-16 08:07:37 -0400
committerMalfurious <m@lfurio.us>2023-09-16 08:07:37 -0400
commit77ae1784961d203d47c9db8736570a2d1e90f7b7 (patch)
tree57e0339c501afb6939031f41fd769b3d04e5b582 /cgit
parenta6f2c9e34b7a0bdaff2a44b54ca7999728f36773 (diff)
parent51b47c3d0eb8e9c638d002aec566ef158ff5d0cd (diff)
downloadsrcnode-77ae1784961d203d47c9db8736570a2d1e90f7b7.tar.gz
srcnode-77ae1784961d203d47c9db8736570a2d1e90f7b7.zip
Merge branch 'cgit-alpine-port'
Port the cgit docker image to build from Alpine Linux, and finish the file tree clean up started by the previous merge. * cgit-alpine-port: cgit: Update SSH clone URLs cgit: Update scan-path / repository mount location cgit: Update user and file paths for alpine distro cgit: Port Dockerfile for alpine base cgit: Consolidate config files into a single directory
Diffstat (limited to '')
-rw-r--r--cgit/Dockerfile12
-rw-r--r--cgit/cgitrc (renamed from docker/cgitrc)4
-rw-r--r--cgit/httpd.conf (renamed from docker/httpd.conf)18
3 files changed, 23 insertions, 11 deletions
diff --git a/cgit/Dockerfile b/cgit/Dockerfile
new file mode 100644
index 0000000..9e1c442
--- /dev/null
+++ b/cgit/Dockerfile
@@ -0,0 +1,12 @@
+# https://git.zx2c4.com/cgit/
+
+FROM alpine
+
+RUN apk --no-cache upgrade
+RUN apk --no-cache add apache2 cgit
+
+COPY httpd.conf /etc/apache2/
+COPY cgitrc /etc/
+
+EXPOSE 80
+CMD ["/usr/sbin/httpd", "-DFOREGROUND"]
diff --git a/docker/cgitrc b/cgit/cgitrc
index 6df01d2..34bbe81 100644
--- a/docker/cgitrc
+++ b/cgit/cgitrc
@@ -10,7 +10,7 @@ logo-link=/
root-title=NormalMode.org Repositories
root-desc=Public repositories hosted on normalmode.org
-clone-url=https://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL ssh://gitolite@$HTTP_HOST/$CGIT_REPO_URL
+clone-url=https://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL ssh://git@$HTTP_HOST/$CGIT_REPO_URL
enable-blame=1
enable-follow-links=1
@@ -35,4 +35,4 @@ remove-suffix=1
section-from-path=-1
strict-export=gl-creator
-scan-path=/data/repositories/
+scan-path=/repositories/
diff --git a/docker/httpd.conf b/cgit/httpd.conf
index 50f88aa..e8ee772 100644
--- a/docker/httpd.conf
+++ b/cgit/httpd.conf
@@ -1,20 +1,20 @@
# https://httpd.apache.org/docs/current/
# https://httpd.apache.org/docs/current/mod/directives.html
-LoadModule alias_module modules/mod_alias.so
-LoadModule authz_core_module modules/mod_authz_core.so
-LoadModule cgid_module modules/mod_cgid.so
-LoadModule mpm_event_module modules/mod_mpm_event.so
-LoadModule unixd_module modules/mod_unixd.so
+LoadModule alias_module /usr/lib/apache2/mod_alias.so
+LoadModule authz_core_module /usr/lib/apache2/mod_authz_core.so
+LoadModule cgid_module /usr/lib/apache2/mod_cgid.so
+LoadModule mpm_event_module /usr/lib/apache2/mod_mpm_event.so
+LoadModule unixd_module /usr/lib/apache2/mod_unixd.so
-ServerRoot "/etc/httpd"
+ServerRoot "/etc/apache2"
ServerAdmin webmaster@example.com
ServerName localhost
Listen 80
-User http
-Group http
+User apache
+Group apache
-ErrorLog "/var/log/httpd/error_log"
+ErrorLog "/var/log/apache2/error_log"
LogLevel warn
<Directory "/">