Mapleloom
Docs / Usage

Running as a service

Mapleloom runs as a long-lived service. On most Linux systems that means a systemd unit.

systemd

Create a user for it and the unit:

$ sudo useradd --system --home /var/lib/mapleloom --create-home --shell /usr/sbin/nologin mapleloom
# /etc/systemd/system/mapleloom.service
[Unit]
Description=Mapleloom
After=network-online.target
Wants=network-online.target

[Service]
User=mapleloom
ExecStart=/usr/local/bin/mapleloom worker
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=5
NoNewPrivileges=true
ProtectSystem=strict
ReadWritePaths=/var/lib/mapleloom

[Install]
WantedBy=multi-user.target
$ sudo systemctl daemon-reload
$ sudo systemctl enable --now mapleloom
$ journalctl -u mapleloom -f

Mapleloom reloads its configuration on SIGHUP, so systemctl reload mapleloom applies changes without a restart.

Containers

Release archives include a Dockerfile. Build the image once and run it with the configuration mounted:

$ docker build -t mapleloom:0.4.1 .
$ docker run -d --name mapleloom --restart unless-stopped -v /etc/mapleloom:/etc/mapleloom:ro mapleloom:0.4.1 worker

Upgrading

Replace the binary and restart. Within a major version the configuration stays compatible; the changelog says when anything needs your attention.