guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] services: nginx: Allow for server extensions.


From: Ludovic Courtès
Subject: Re: [PATCH] services: nginx: Allow for server extensions.
Date: Sun, 28 Feb 2016 17:31:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hi!

Ping!  :-)

Ludo’.

address@hidden (Ludovic Courtès) skribis:

> David Thompson <address@hidden> skribis:
>
>> Looking for some feedback on my first stab at making the nginx service
>> extensible.  With this extension mechanism, future web applications
>> (such as GNU MediaGoblin) that use nginx as a front-end web server will
>> be able to extend nginx with the server configuration that they need in
>> order to work.
>
> Excellent!
>
>> Here's a useless service that adds nginx configuration to serve the
>> contents of /tmp:
>>
>>     (define server
>>       (plain-file "foo.conf"
>>                   "
>>     server {
>>       listen 80;
>>       root /tmp;
>>       index index.html;
>>       server_name dthompson.us;
>>     }
>>     "))
>
> Do you think it would make sense to provide Scheme bindings for those
> ‘server’ configuration snippets, or would we lose too much
> expressiveness?
>
>> From 108db2d183526c42b53060e55f7fb292b53663cb Mon Sep 17 00:00:00 2001
>> From: David Thompson <address@hidden>
>> Date: Mon, 30 Nov 2015 08:49:08 -0500
>> Subject: [PATCH] services: nginx: Allow for server extensions.
>>
>> * gnu/services/web.scm (<nginx-configuration>)[servers]: New field.
>>   (nginx-configuration-servers): New accessor.
>>   (default-nginx-config): Delete.
>>   (nginx-configuration-file*): New procedure.
>>   (nginx-activation): Perform the syntax check on the full computed
>>   configuration file.
>>   (nginx-dmd-service): Use the full computed configuration file when
>>   starting the service.
>>   (extend-nginx): New procedure.
>>   (nginx-service-type): Specify extension procedures.
>>   (nginx-service): Add #:servers argument.
>
> [...]
>
>> +(define (nginx-configuration-file* config)
>
> ‘nginx-configuration->file’ maybe?
>
> Otherwise LGTM!
>
> As an exercise, and while waiting for Chris to finish packaging
> MediaGoblin ;-), it might make sense to try to use nginx in
> ‘guix-publish-service’ or a variant thereof.
>
> Thank you!
>
> Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]