From 2d395340236352edaeb15cea56a9e65cc740453a Mon Sep 17 00:00:00 2001 From: eric o meehan Date: Thu, 8 Aug 2024 11:04:51 -0400 Subject: [PATCH] v0.0.5 --- files/footer.html | 6 ++++++ files/gitweb.conf | 24 ++++++++++++++++++++---- files/header.html | 14 ++++++++++++++ files/httpd-dav.conf | 2 +- files/httpd-ssi.conf | 4 ++++ tasks/git.yaml | 27 ++++++++++++++++++++++----- tasks/www.yaml | 4 ++-- 7 files changed, 69 insertions(+), 12 deletions(-) create mode 100644 files/footer.html create mode 100644 files/header.html diff --git a/files/footer.html b/files/footer.html new file mode 100644 index 0000000..0ef34f6 --- /dev/null +++ b/files/footer.html @@ -0,0 +1,6 @@ +

+ diff --git a/files/gitweb.conf b/files/gitweb.conf index eca1626..a09aa90 100644 --- a/files/gitweb.conf +++ b/files/gitweb.conf @@ -1,9 +1,20 @@ +# name of your site or organization, to appear in page titles. +$site_name = "EOM - Git"; + # path to git projects (.git) $projectroot = "/usr/local/apache2/htdocs"; # directory to use for temp files $git_temp = "/tmp"; +$per_request_config = true; +$my_uri = "https://git.eom.dev/"; +$my_url = "https://git.eom.dev/"; +$base_url = "https://git.eom.dev/"; +$omit_owner = true; +$site_header = "/usr/local/apache2/htdocs/static/header.html"; +$site_footer = "/usr/local/apache2/htdocs/static/footer.html"; + # target of the home link on top of all pages #$home_link = $my_uri || "/"; @@ -14,16 +25,21 @@ $git_temp = "/tmp"; #$projects_list = $projectroot; # stylesheet to use -#@stylesheets = ("static/gitweb.css"); +@stylesheets = ( + "https://media.eom.dev/gitweb/gitweb.css", + "https://www.eom.dev/css/header.css", + "https://www.eom.dev/css/nav.css", + "https://www.eom.dev/css/footer.css" +); # javascript code for gitweb -#$javascript = "static/gitweb.js"; +$javascript = "https://media.eom.dev/gitweb/gitweb.js"; # logo to use -#$logo = "static/git-logo.png"; +$logo = "https://media.eom.dev/gitweb/git-logo.png"; # the 'favicon' -#$favicon = "static/git-favicon.png"; +$favicon = "https://media.eom.dev/favicon/favicon.ico"; # git-diff-tree(1) options to use for generated patches #@diff_opts = ("-M"); diff --git a/files/header.html b/files/header.html new file mode 100644 index 0000000..d9ea3ba --- /dev/null +++ b/files/header.html @@ -0,0 +1,14 @@ +
+

EOM

+
+ +

+

Git

diff --git a/files/httpd-dav.conf b/files/httpd-dav.conf index 177f2fd..b61af02 100644 --- a/files/httpd-dav.conf +++ b/files/httpd-dav.conf @@ -14,7 +14,7 @@ LoadModule dav_fs_module modules/mod_dav_fs.so # on the directory where the DavLockDB is placed and on any directory where # "Dav On" is specified. -DavLockDB "/usr/local/apache2/var/DavLock" +DavLockDB "/usr/local/apache2/DavLock" Dav On diff --git a/files/httpd-ssi.conf b/files/httpd-ssi.conf index cef7522..6ad2a8f 100644 --- a/files/httpd-ssi.conf +++ b/files/httpd-ssi.conf @@ -5,3 +5,7 @@ AddOutputFilter INCLUDES .shtml Options +Includes + + + DirectoryIndex index.shtml + diff --git a/tasks/git.yaml b/tasks/git.yaml index 6368fda..e99b744 100644 --- a/tasks/git.yaml +++ b/tasks/git.yaml @@ -1,6 +1,17 @@ --- # tasks file for git -- name: Create a config map for httpd +- name: Create a config map for git gitweb + k8s: + state: present + api_version: v1 + kind: ConfigMap + name: git-gitweb + namespace: "eom-{{ target_namespace }}" + definition: + data: + gitweb.conf: "{{ lookup('file', 'gitweb.conf') }}" + +- name: Create a config map for git httpd vars: httpd_server_name: "git.eom.dev" httpd_conf_extra: @@ -10,7 +21,7 @@ state: present api_version: v1 kind: ConfigMap - name: git + name: git-httpd namespace: "eom-{{ target_namespace }}" definition: data: @@ -85,16 +96,22 @@ - name: gitweb image: ericomeehan/gitweb volumeMounts: - - name: config + - name: gitweb-config + mountPath: /etc/gitweb.conf + subPath: gitweb.conf + - name: httpd-config mountPath: /usr/local/apache2/conf - name: data mountPath: /usr/local/apache2/htdocs ports: - containerPort: 80 volumes: - - name: config + - name: gitweb-config configMap: - name: git + name: git-gitweb + - name: httpd-config + configMap: + name: git-httpd - name: data persistentVolumeClaim: claimName: git diff --git a/tasks/www.yaml b/tasks/www.yaml index 4ee59ad..a503cc0 100644 --- a/tasks/www.yaml +++ b/tasks/www.yaml @@ -38,8 +38,8 @@ app: www spec: containers: - - name: httpd - image: httpd + - name: www + image: ericomeehan/www volumeMounts: - name: config mountPath: /usr/local/apache2/conf