This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/20416 )
Change subject: cgit: Don't depend on unmaintained upstream; work directly with debian
......................................................................
cgit: Don't depend on unmaintained upstream; work directly with debian
Change-Id: Ifa98f77c24298265e39313b679944d649e25ddde
---
M cgit/Dockerfile
A cgit/config/cgitrc
A cgit/config/nginx.conf
3 files changed, 84 insertions(+), 2 deletions(-)
Approvals:
laforge: Looks good to me, approved; Verified
diff --git a/cgit/Dockerfile b/cgit/Dockerfile
index 4cf494a..6af0d58 100644
--- a/cgit/Dockerfile
+++ b/cgit/Dockerfile
@@ -1,7 +1,30 @@
-FROM ankitrgadiya/cgit:debian-nginx
+# from https://github.com/ankitrgadiya/docker-cgit/blob/master/debian-nginx/Dockerfile
+################################################################################
+FROM debian:latest
+
+# Update repositories the system
+RUN apt-get update
+
+# Install packages
+RUN apt-get install git cgit nginx highlight fcgiwrap -y
+
+# Add configurations
+ADD config/nginx.conf /etc/nginx/sites-available/git
+ADD config/cgitrc /etc/cgitrc
+
+# Enable configuration
+RUN rm -rf /etc/nginx/sites-enabled/*
+RUN ln -s /etc/nginx/sites-available/git /etc/nginx/sites-enabled/git
+
+# Start
+EXPOSE 80
+CMD service fcgiwrap restart && nginx -g 'daemon off;'
+
+# osmocom additions
+################################################################################
# This adds the Osmocom specific syntax highlighting + redmine/gerrit integration
-
+RUN apt-get update
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3 \
diff --git a/cgit/config/cgitrc b/cgit/config/cgitrc
new file mode 100644
index 0000000..770e37d
--- /dev/null
+++ b/cgit/config/cgitrc
@@ -0,0 +1,36 @@
+# CGIT config
+virtual-root=/
+
+css=/cgit.css
+# logo=/logo.png
+footer=
+
+source-filter=/usr/lib/cgit/filters/syntax-highlighting.sh
+root-title=Repositories
+root-desc=
+noplainemail=1
+
+# clone-prefix=http://example.com
+
+# Enable snapshots
+snapshots=tar.gz zip
+
+# Disable owner index
+enable-index-owner=0
+
+mimetype.git=image/git
+mimetype.html=text/html
+mimetype.jpg=image/jpeg
+mimetype.jpeg=image/jpeg
+mimetype.pdf=application/pdf
+mimetype.png=image/png
+mimetype.svg=image/svg+xml
+
+# Caching
+cache-dynamic-ttl=60
+cache-static-ttl=44640
+cache-root-ttl=6
+cache-repo-ttl=120
+
+scan-path=/git
+
diff --git a/cgit/config/nginx.conf b/cgit/config/nginx.conf
new file mode 100644
index 0000000..4c91d52
--- /dev/null
+++ b/cgit/config/nginx.conf
@@ -0,0 +1,23 @@
+server {
+ listen 80 default_server;
+
+ # listen 443 ssl;
+
+ # ssl_certificate /etc/nginx/certs/final.crt;
+ # ssl_certificate_key /etc/nginx/certs/private.key;
+
+ server_name localhost;
+ index cgit.cgi;
+
+ root /usr/share/cgit;
+ try_files $uri @cgit;
+
+ location @cgit {
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi;
+ fastcgi_param PATH_INFO $uri;
+ fastcgi_param QUERY_STRING $args;
+ fastcgi_param HTTP_HOST $server_name;
+ fastcgi_pass unix:/run/fcgiwrap.socket;
+ }
+}
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/20416
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ifa98f77c24298265e39313b679944d649e25ddde
Gerrit-Change-Number: 20416
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201003/5bb82234/attachment.htm>