aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docker/frontend/etc
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-03-26 12:44:29 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2022-03-26 12:44:31 +0300
commit0f5dbcc3bdeb401f00c1cdcb7b0ef826003b5bd7 (patch)
treed6d591ba8845d6cda37c756a44f9c92605c7df09 /docker/frontend/etc
parentdocker: run once at startup, even when in cron (diff)
downloadcgitize-0f5dbcc3bdeb401f00c1cdcb7b0ef826003b5bd7.tar.gz
cgitize-0f5dbcc3bdeb401f00c1cdcb7b0ef826003b5bd7.zip
docker: add a frontend nginx image
At first, I built a custom image at https://egort.name/. It had a rather long development history, and I just copied the files from there.
Diffstat (limited to 'docker/frontend/etc')
-rw-r--r--docker/frontend/etc/cgit/cgitrc4
-rw-r--r--docker/frontend/etc/cgit/common36
-rw-r--r--docker/frontend/etc/nginx/conf.d/default.conf24
3 files changed, 64 insertions, 0 deletions
diff --git a/docker/frontend/etc/cgit/cgitrc b/docker/frontend/etc/cgit/cgitrc
new file mode 100644
index 0000000..e12b2f4
--- /dev/null
+++ b/docker/frontend/etc/cgit/cgitrc
@@ -0,0 +1,4 @@
+include=/etc/cgit/common
+
+root-title=My git repositories
+root-desc=Synced using https://github.com/egor-tensin/cgitize
diff --git a/docker/frontend/etc/cgit/common b/docker/frontend/etc/cgit/common
new file mode 100644
index 0000000..4fdf2a5
--- /dev/null
+++ b/docker/frontend/etc/cgit/common
@@ -0,0 +1,36 @@
+css=/cgit/cgit.css
+logo=/cgit/cgit.png
+favicon=/cgit/favicon.ico
+
+mimetype.bmp=image/bmp
+mimetype.gif=image/gif
+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
+
+enable-blame=1
+enable-commit-graph=1
+enable-follow-links=1
+enable-index-links=1
+enable-index-owner=0
+enable-subject-links=1
+max-blob-size=10000
+max-repo-count=100
+max-stats=year
+remove-suffix=1
+snapshots=tar.gz tar.bz2 zip
+
+about-filter=/usr/lib/cgit/filters/about-formatting.sh
+readme=:README.md
+readme=:readme.md
+readme=:README.txt
+readme=:readme.txt
+readme=:README
+readme=:readme
+
+source-filter=/usr/lib/cgit/filters/syntax-highlighting.py
+
+scan-path=/mnt/cgitize
diff --git a/docker/frontend/etc/nginx/conf.d/default.conf b/docker/frontend/etc/nginx/conf.d/default.conf
new file mode 100644
index 0000000..4dd9402
--- /dev/null
+++ b/docker/frontend/etc/nginx/conf.d/default.conf
@@ -0,0 +1,24 @@
+server {
+ listen 80 default_server;
+ listen [::]:80 default_server;
+ server_name _;
+
+ location / {
+ index index.html;
+ }
+
+ location /cgit/ {
+ alias /usr/share/cgit/;
+ }
+
+ location /git/ {
+ include fastcgi_params;
+ fastcgi_pass unix:/run/fcgiwrap.sock;
+
+ fastcgi_param CGIT_CONFIG /etc/cgit/cgitrc;
+ fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi;
+
+ fastcgi_split_path_info ^(/git/?)(.+)$;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ }
+}