From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Webservices and Shepherd Date: Mon, 03 Apr 2017 15:50:39 +0200 Message-ID: <87efx9mwgg.fsf@gnu.org> References: <20170402114426.4c656028@hitpoints> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cv2Nf-0004ri-J5 for help-guix@gnu.org; Mon, 03 Apr 2017 09:50:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cv2Ne-0007Ye-6f for help-guix@gnu.org; Mon, 03 Apr 2017 09:50:51 -0400 In-Reply-To: <20170402114426.4c656028@hitpoints> (Thomas Sigurdsen's message of "Sun, 2 Apr 2017 11:44:26 +0200") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Thomas Sigurdsen Cc: "help-guix@gnu.org" Thomas Sigurdsen skribis: > I will, over the coming week or so, begin setting up a server (for web pa= ges, > 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 servic= es > out there? Did you look at =E2=80=9Cinfo "(guix)Web Services"=E2=80=9D? ( 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=E2=80=99t tried complex web service config, but I think Chris Baines Cc=E2=80=99d 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=C2=A01 to start the service under a separate UID. For instance, nginx may run as the =E2=80=98nginx=E2=80=99 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=E2=80=99.