From: ludo@gnu.org (Ludovic Courtès)
To: Thomas Sigurdsen <thomas.sigurdsen@gmail.com>
Cc: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: Re: Webservices and Shepherd
Date: Mon, 03 Apr 2017 15:50:39 +0200 [thread overview]
Message-ID: <87efx9mwgg.fsf@gnu.org> (raw)
In-Reply-To: <20170402114426.4c656028@hitpoints> (Thomas Sigurdsen's message of "Sun, 2 Apr 2017 11:44:26 +0200")
Thomas Sigurdsen <thomas.sigurdsen@gmail.com> skribis:
> I will, over the coming week or so, begin setting up a server (for web pages,
> file sharing and hopefully email).
>
> Webservices: Is it preferred to put their "program files" in package
> definitions and telling shepherd how to run them in services?
>
> Are there any examples of a guixsd server config with multiple web services
> out there?
Did you look at “info "(guix)Web Services"”?
(<https://gnu.org/software/guix/manual/html_node/Web-Services.html> is
an older, less complete version of that.)
GuixSD has a service definition for nginx, which aims to make it easy to
deploy nginx. A simple example can be seen in this test:
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/tests/web.scm
For more complex nginx configuration, you can let it use a native nginx
config file instead of the Scheme config.
I haven’t tried complex web service config, but I think Chris Baines
Cc’d has and might be able to help.
> And when it comes to shepherd: I've seen a few configs where shepherd is
> running as a user in addition to root. It looks like this is a good way to
> separate webservices and similar, maybe even giving them separate users. But
> does it mean shepherd is running multiple instances, increasing overhead and
> difficulty of management (as in how do I know which shepherd I'm talking to
> and so on)?
For system services like nginx, the service definition can just tell the
Shepherd running as PID 1 to start the service under a separate UID.
For instance, nginx may run as the ‘nginx’ user.
Running shepherd as a user is only useful if you plan to have per-user
services. For instance, I run privoxy and an mcron instance like this.
HTH!
Ludo’.
next prev parent reply other threads:[~2017-04-03 13:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-02 9:44 Webservices and Shepherd Thomas Sigurdsen
2017-04-03 13:50 ` Ludovic Courtès [this message]
2017-04-03 15:56 ` Alex Kost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87efx9mwgg.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=help-guix@gnu.org \
--cc=thomas.sigurdsen@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).