diff options
Diffstat (limited to 'roles/gitano_server/templates')
-rw-r--r-- | roles/gitano_server/templates/apache-cgit-host.j2 | 37 | ||||
-rw-r--r-- | roles/gitano_server/templates/cgitrc.j2 | 49 | ||||
-rw-r--r-- | roles/gitano_server/templates/gitano-setup.answers | 11 |
3 files changed, 97 insertions, 0 deletions
diff --git a/roles/gitano_server/templates/apache-cgit-host.j2 b/roles/gitano_server/templates/apache-cgit-host.j2 new file mode 100644 index 0000000..2f9eeb0 --- /dev/null +++ b/roles/gitano_server/templates/apache-cgit-host.j2 @@ -0,0 +1,37 @@ +<VirtualHost *:80> + ServerName {{ item }} + ServerAdmin root@localhost + DocumentRoot /var/lib/misc/cgit-docroot + ErrorLog /var/log/apache2/{{ item }}/error.log + CustomLog /var/log/apache2/{{ item }}/access.log combined + + ScriptAlias /cgi-bin/cgit/ /usr/lib/cgit/ + ScriptAlias /cgi-bin/ /usr/lib/cgit/ + + <Directory "/usr/lib/cgit"> + AllowOverride None + Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch + Require all granted + </Directory> + + # CGIT stuff + DirectoryIndex /cgi-bin/cgit.cgi + Alias /cgit.png /usr/share/cgit/cgit.png + Alias /cgit.css /usr/share/cgit/cgit.css + <Directory "/home/git/repos"> + Options FollowSymlinks Indexes + AllowOverride none + Require all granted + </Directory> + + <Location /> + Require all granted + </Location> + + RewriteEngine on + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !cgit + RewriteRule ^.* /cgi-bin/cgit.cgi/$0 [L,PT] + +</VirtualHost> diff --git a/roles/gitano_server/templates/cgitrc.j2 b/roles/gitano_server/templates/cgitrc.j2 new file mode 100644 index 0000000..4e518cf --- /dev/null +++ b/roles/gitano_server/templates/cgitrc.j2 @@ -0,0 +1,49 @@ +# Enable caching of up to 1000 output entriess +cache-size=1000 + +# Specify some default clone prefixes +clone-prefix=git://{{ item }} + +# Specify the css url +css=/cgit.css + +# Specify the logo url +logo=/cgit.png + +# Show extra links for each repository on the index page +enable-index-links=1 + +# Show number of affected files per commit on the log pages +enable-log-filecount=1 + +# Show number of added/removed lines per commit on the log pages +enable-log-linecount=1 + +# Set the title and heading of the repository index page +root-title={{ item }} +root-desc=git repositories for {{ item }} + +# Allow download of tar.gz, tar.bz2 and zip-files +snapshots=tar.gz + +#source-filter=/usr/lib/cgit/filters/syntax-highlighting.sh + +remove-suffix=1 + +enable-git-config=1 + +strict-export=git-daemon-export-ok + +scan-path=/home/git/repos + +virtual-root=/ + +## +## List of common mimetypes +## +mimetype.git=image/git +mimetype.html=text/html +mimetype.jpg=image/jpeg +mimetype.pdf=application/pdf +mimetype.png=image/png +mimetype.svg=image/svg+xml diff --git a/roles/gitano_server/templates/gitano-setup.answers b/roles/gitano_server/templates/gitano-setup.answers new file mode 100644 index 0000000..9c7711e --- /dev/null +++ b/roles/gitano_server/templates/gitano-setup.answers @@ -0,0 +1,11 @@ +setup.batch "yes" +paths.bypasskey "/home/git/bypass.pub" +paths.home "/home/git" +paths.ssh "/home/git/.ssh" +paths.pubkey "/home/git/admin.pub" +paths.repos "/home/git/repos" +admin.username "admin" +admin.realname "Administrator" +admin.email "admin@administrator.local" +site.name "{{ gitano_site_name }}" +log.prefix "{{ gitano_log_prefix }}" |