summary refs log tree commit diff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2018-01-12 23:14:14 +0100
committerJulien Lepiller <julien@lepiller.eu>2018-02-14 23:18:41 +0100
commit08da664d1041133e8282a5df0fcab6eee7e548fa (patch)
tree8b9ce1e125c2479ed6673e6d212df0a55ac47282 /doc/guix.texi
parent3bedac50571204643d5e3b204dc720ae7d571a1f (diff)
downloadguix-08da664d1041133e8282a5df0fcab6eee7e548fa.tar.gz
gnu: Add cat-avatar-generator-service.
* gnu/services/web.scm (cat-avatar-generator-service): New variable.
* doc/guix.text (Web Services): Document it.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi25
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 08f531b4ec..9dafe60eeb 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -15641,6 +15641,31 @@ A simple services setup for nginx with php can look like this:
                  %base-services))
 @end example
 
+@cindex cat-avatar-generator
+The cat avatar generator is a simple service to demonstrate the use of php-fpm
+in @code{Nginx}.  It is used to generate cat avatar from a seed, for instance
+the hash of a user's email address.
+
+@deffn {Scheme Procedure} cat-avatar-generator-serice @
+       [#:cache-dir "/var/cache/cat-avatar-generator"] @
+       [#:package cat-avatar-generator] @
+       [#:configuration (nginx-server-configuration)]
+Returns an nginx-server-configuration that inherits @code{configuration}.  It
+extends the nginx configuration to add a server block that serves @code{package},
+a version of cat-avatar-generator.  During execution, cat-avatar-generator will
+be able to use @code{cache-dir} as its cache directory.
+@end deffn
+
+A simple setup for cat-avatar-generator can look like this:
+@example
+(services (cons* (cat-avatar-generator-service
+                  #:configuration
+                  (nginx-server-configuration
+                    (server-name '("example.com"))))
+                 ...
+                 %base-services))
+@end example
+
 @node Certificate Services
 @subsubsection Certificate Services