First commit
This commit is contained in:
commit
e3c80b5945
36
Dockerfile
Normal file
36
Dockerfile
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# Select your image
|
||||||
|
FROM ubi9:latest
|
||||||
|
|
||||||
|
# Install your packages and the perl modules required for gitweb
|
||||||
|
RUN yum install -y git make diffutils httpd php php-cli mod_fcgid perl-FCGI perl-filetest perl-Time-HiRes mod_ssl
|
||||||
|
RUN yum install -y https://dl.rockylinux.org/pub/rocky/9/AppStream/x86_64/os/Packages/p/perl-CGI-4.51-5.el9.noarch.rpm
|
||||||
|
RUN yum install -y https://rpmfind.net/linux/epel/9/Everything/x86_64/Packages/p/perl-FreezeThaw-0.5001-37.el9.noarch.rpm
|
||||||
|
RUN yum install -y http://repo.iotti.biz/CentOS/9/noarch/perl-CGI-Session-4.48-26.el9.lux.noarch.rpm
|
||||||
|
|
||||||
|
# Configure the apache web server
|
||||||
|
RUN rm -f /etc/httpd/conf.d/*.conf
|
||||||
|
RUN chown apache:apache -R /etc/httpd/logs/
|
||||||
|
RUN openssl dhparam -out /etc/httpd/dh4096.pem 4096
|
||||||
|
RUN echo 'SSLOpenSSLConfCmd DHParameters /etc/httpd/dh4096.pem' >> /etc/httpd/conf.modules.d/00-ssl.conf
|
||||||
|
RUN sed -i 's/Listen 80/Listen 80\nListen 443/g' /etc/httpd/conf/httpd.conf
|
||||||
|
# RUN echo -e '<IfModule mod_ssl.c>\n Listen 443\n</IfModule>' >> /etc/httpd/conf/httpd.conf
|
||||||
|
ADD git.domain.com.conf /etc/httpd/conf.d/
|
||||||
|
ADD gitweb.conf /etc/
|
||||||
|
|
||||||
|
# Configure the git user and build the gitweb script
|
||||||
|
RUN useradd git
|
||||||
|
RUN mkdir /srv/git
|
||||||
|
RUN chown git:git /srv/git
|
||||||
|
USER git
|
||||||
|
WORKDIR /home/git
|
||||||
|
RUN git clone git://git.kernel.org/pub/scm/git/git.git
|
||||||
|
WORKDIR git/
|
||||||
|
RUN make GITWEB_PROJECTROOT="/srv/git" prefix=/usr gitweb
|
||||||
|
USER root
|
||||||
|
RUN cp -Rf gitweb /var/www/
|
||||||
|
RUN mkdir /var/www/gitweb/custom
|
||||||
|
RUN rm -rf /home/git/git
|
||||||
|
|
||||||
|
# Expose HTTP/S and run the apache web server
|
||||||
|
EXPOSE 80 443
|
||||||
|
CMD ["/usr/sbin/httpd","-D","FOREGROUND"]
|
||||||
9
README.txt
Normal file
9
README.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
This Dockerfile is intended to sping up an apache web server with a gitweb repository.
|
||||||
|
|
||||||
|
The process of using and setting up this solution has been detailed in the below article:
|
||||||
|
https://96-fromsofia.net/articles/git-to-ecs/
|
||||||
|
|
||||||
|
To build the container:
|
||||||
|
$ podman build -t gitweb:01 .
|
||||||
|
|
||||||
|
If you have any question regarding this build you can email me at: 2a9-7cc@96-fromsofia.net
|
||||||
68
git.domain.com.conf
Normal file
68
git.domain.com.conf
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName git.96-fromsofia.net
|
||||||
|
ServerAlias www.git.96-fromsofia.net
|
||||||
|
DocumentRoot /var/www/gitweb
|
||||||
|
|
||||||
|
# Force HTTP to HTTPS redirects
|
||||||
|
#RewriteEngine On
|
||||||
|
#RewriteCond %{HTTPS} off
|
||||||
|
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
||||||
|
|
||||||
|
<Directory /var/www/gitweb>
|
||||||
|
SetEnv GITWEB_CONFIG /etc/gitweb.conf
|
||||||
|
Options +ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
|
||||||
|
AllowOverride All
|
||||||
|
order allow,deny
|
||||||
|
Allow from all
|
||||||
|
AddHandler cgi-script .cgi
|
||||||
|
DirectoryIndex gitweb.cgi
|
||||||
|
</Directory>
|
||||||
|
<Files gitweb.cgi>
|
||||||
|
SetHandler cgi-script
|
||||||
|
</Files>
|
||||||
|
|
||||||
|
CustomLog /var/log/httpd/git.96-fromsofia.net-access.log combined
|
||||||
|
ErrorLog /var/log/httpd/git.96-fromsofia.net-error.log
|
||||||
|
|
||||||
|
# Possible values include: debug, info, notice, warn, error, crit,
|
||||||
|
# alert, emerg.
|
||||||
|
LogLevel warn
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
<VirtualHost *:443>
|
||||||
|
ServerName git.96-fromsofia.net
|
||||||
|
ServerAlias www.git.96-fromsofia.net
|
||||||
|
DocumentRoot /var/www/gitweb
|
||||||
|
<Directory /var/www/gitweb>
|
||||||
|
SetEnv GITWEB_CONFIG /etc/gitweb.conf
|
||||||
|
Options +ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
|
||||||
|
AllowOverride All
|
||||||
|
order allow,deny
|
||||||
|
Allow from all
|
||||||
|
AddHandler cgi-script .cgi
|
||||||
|
DirectoryIndex gitweb.cgi
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
CustomLog /var/log/httpd/git.96-fromsofia.net-access.log combined
|
||||||
|
ErrorLog /var/log/httpd/git.96-fromsofia.net-error.log
|
||||||
|
|
||||||
|
# Possible values include: debug, info, notice, warn, error, crit,
|
||||||
|
# alert, emerg.
|
||||||
|
LogLevel warn
|
||||||
|
|
||||||
|
# SSLEngine On
|
||||||
|
# SSLProtocol all -SSLv2 -SSLv3
|
||||||
|
# SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
|
||||||
|
# SSLHonorCipherOrder on
|
||||||
|
# SSLOptions +StrictRequire
|
||||||
|
# SSLCertificateFile /etc/letsencrypt/live/git.96-fromsofia.net/cert.pem
|
||||||
|
# SSLCertificateKeyFile /etc/letsencrypt/live/git.96-fromsofia.net/privkey.pem
|
||||||
|
# SSLCertificateChainFile /etc/letsencrypt/live/git.96-fromsofia.net/fullchain.pem
|
||||||
|
|
||||||
|
<Files gitweb.cgi>
|
||||||
|
SetHandler cgi-script
|
||||||
|
</Files>
|
||||||
|
|
||||||
|
BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
|
||||||
|
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
|
||||||
|
</VirtualHost>
|
||||||
14
gitweb.conf
Normal file
14
gitweb.conf
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# AMEND DOMAIN NAME AND PATHS ACCORDINGLY!!
|
||||||
|
our $projectroot = "/srv/git/";
|
||||||
|
our $logo = "custom/git-logo.png";
|
||||||
|
our $logo_url = "https://example.com";
|
||||||
|
our $favicon = "custom/favicon.ico";
|
||||||
|
our $site_name = "example.com Git Repository";
|
||||||
|
our $home_link_str = "example.com >> Git Projects";
|
||||||
|
our $home_text = "custom/home_text.html";
|
||||||
|
our $omit_age_column = "true";
|
||||||
|
our $omit_owner = "true";
|
||||||
|
our $my_url = "http://git.example.com/gitweb.cgi";
|
||||||
|
our $base_url = "http://git.example.com/";
|
||||||
|
our $snapshot = "false";
|
||||||
|
our $timed = "true";
|
||||||
Loading…
Reference in New Issue
Block a user