SysAdmin/Debian#

Topics of interest#

Mainly basic sys admin, but targetting toward maintening debian based instances.

It would be mainly cheat sheets to remind me about:

  • different debian version and their validity date ranges (LTS, …)

  • systemd reminder

UWSGI service with NGINX#

The original source of this configuration comes from pyramid cook documentation.

Systemd for UWSGI#

God starting points are:

The following block defines the unit and its dependencies (Requires/After archlinux docs).

[Unit]

Description=UWSGI App

Requires=network.target

After=network.target

The service configuration is defined next.

  • service type is notify (Reminder Service type). It uses dbus to notify the process has finished starting up.

  • TimeoutStartSec timeout to wait for start up before considering the process failed and restarting it.

uwsgi automatically detects when it is launched by systemd.

[Service]

Type=notify
NotifyAccess=all

TimeoutStartSec=0
RestartSec=10
Restart=always

KillSignal=SIGQUIT

User=app
WorkingDirectory=/opt/env/wiki

ExecStart=/bin/uwsgi --ini-paste-logged <conf.ini>
[Install]

WantedBy=multi-user.target