summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2021-08-05 03:46:40 +0200
committerJulien Lepiller <julien@lepiller.eu>2021-09-02 22:56:55 +0200
commitc60daa8e9dfa5f641ecb5f4f3a9135e27b58d2d7 (patch)
tree70f8f431c5ccd7a04f43255b2b7ab079f661bd45 /doc
parentcc16103861b26836908a7d16e0751739a0e20da2 (diff)
gnu: version-control: Add gitile service.
* gnu/services/version-control.scm (gitile-service-type): New variable. * doc/guix.texi (Version Control Services): Document it. * gnu/tests/version-control.scm (%test-gitile): New variable.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi132
1 files changed, 132 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index ab178a6b068..36a0c7f5ec7 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -25144,6 +25144,7 @@ of strings and G-expressions.
25144@end table 25144@end table
25145@end deffn 25145@end deffn
25146 25146
25147@anchor{NGINX}
25147@subsubheading NGINX 25148@subsubheading NGINX
25148 25149
25149@deffn {Scheme Variable} nginx-service-type 25150@deffn {Scheme Variable} nginx-service-type
@@ -31544,6 +31545,137 @@ This setting controls the commands and features to enable within Gitolite.
31544@end deftp 31545@end deftp
31545 31546
31546 31547
31548@subsubheading Gitile Service
31549
31550@cindex Gitile service
31551@cindex Git, forge
31552@uref{https://git.lepiller.eu/gitile, Gitile} is a Git forge for viewing
31553public git repository contents from a web browser.
31554
31555Gitile works best in collaboration with Gitolite, and will serve the public
31556repositories from Gitolite by default. The service should listen only on
31557a local port, and a webserver should be configured to serve static resources.
31558The gitile service provides an easy way to extend the Nginx service for
31559that purpose (@pxref{NGINX}).
31560
31561The following example will configure Gitile to serve repositories from a
31562custom location, with some default messages for the home page and the
31563footers.
31564
31565@lisp
31566(service gitile-service-type
31567 (gitile-configuration
31568 (repositories "/srv/git")
31569 (base-git-url "https://myweb.site/git")
31570 (index-title "My git repositories")
31571 (intro '((p "This is all my public work!")))
31572 (footer '((p "This is the end")))
31573 (nginx-server-block
31574 (nginx-server-configuration
31575 (ssl-certificate
31576 "/etc/letsencrypt/live/myweb.site/fullchain.pem")
31577 (ssl-certificate-key
31578 "/etc/letsencrypt/live/myweb.site/privkey.pem")
31579 (listen '("443 ssl http2" "[::]:443 ssl http2"))
31580 (locations
31581 (list
31582 ;; Allow for https anonymous fetch on /git/ urls.
31583 (git-http-nginx-location-configuration
31584 (git-http-configuration
31585 (uri-path "/git/")
31586 (git-root "/var/lib/gitolite/repositories")))))))))
31587@end lisp
31588
31589In addition to the configuration record, you should configure your git
31590repositories to contain some optional information. First, your public
31591repositories need to contain the @file{git-daemon-export-ok} magic file
31592that allows Git to export the repository. Gitile uses the presence of this
31593file to detect public repositories it should make accessible. To do so with
31594Gitolite for instance, modify your @file{conf/gitolite.conf} to include
31595this in the repositories you want to make public:
31596
31597@example
31598repo foo
31599 R = daemon
31600@end example
31601
31602In addition, Gitile can read the repository configuration to display more
31603infomation on the repository. Gitile uses the gitweb namespace for its
31604configuration. As an example, you can use the following in your
31605@file{conf/gitolite.conf}:
31606
31607@example
31608repo foo
31609 R = daemon
31610 desc = A long description, optionally with <i>HTML</i>, shown on the index page
31611 config gitweb.name = The Foo Project
31612 config gitweb.synopsis = A short description, shown on the main page of the project
31613@end example
31614
31615Do not forget to commit and push these changes once you are satisfied. You
31616may need to change your gitolite configuration to allow the previous
31617configuration options to be set. One way to do that is to add the
31618following service definition:
31619
31620@lisp
31621(service gitolite-service-type
31622 (gitolite-configuration
31623 (admin-pubkey (local-file "key.pub"))
31624 (rc-file
31625 (gitolite-rc-file
31626 (umask #o0027)
31627 ;; Allow to set any configuration key
31628 (git-config-keys ".*")
31629 ;; Allow any text as a valid configuration value
31630 (unsafe-patt "^$")))))
31631@end lisp
31632
31633@deftp {Data Type} gitile-configuration
31634Data type representing the configuration for @code{gitile-service-type}.
31635
31636@table @asis
31637@item @code{package} (default: @var{gitile})
31638Gitile package to use.
31639
31640@item @code{host} (default: @code{"localhost"})
31641The host on which gitile is listening.
31642
31643@item @code{port} (default: @code{8080})
31644The port on which gitile is listening.
31645
31646@item @code{database} (default: @code{"/var/lib/gitile/gitile-db.sql"})
31647The location of the database.
31648
31649@item @code{repositories} (default: @code{"/var/lib/gitolite/repositories"})
31650The location of the repositories. Note that only public repositories will
31651be shown by Gitile. To make a repository public, add an empty
31652@file{git-daemon-export-ok} file at the root of that repository.
31653
31654@item @code{base-git-url}
31655The base git url that will be used to show clone commands.
31656
31657@item @code{index-title} (default: @code{"Index"})
31658The page title for the index page that lists all the available repositories.
31659
31660@item @code{intro} (default: @code{'()})
31661The intro content, as a list of sxml expressions. This is shown above the list
31662of repositories, on the index page.
31663
31664@item @code{footer} (default: @code{'()})
31665The footer content, as a list of sxml expressions. This is shown on every
31666page served by Gitile.
31667
31668@item @code{nginx-server-block}
31669An nginx server block that will be extended and used as a reverse proxy by
31670Gitile to serve its pages, and as a normal web server to serve its assets.
31671
31672You can use this block to add more custom URLs to your domain, such as a
31673@code{/git/} URL for anonymous clones, or serving any other files you would
31674like to serve.
31675@end table
31676@end deftp
31677
31678
31547@node Game Services 31679@node Game Services
31548@subsection Game Services 31680@subsection Game Services
31549 31681