Native binary taken from the @pnpm/pnpr.linux-{x64,arm64} npm platform
packages; systemd service with dynamic sysusers pnpr user. Storage in
/var/lib/pnpr, disposable proxy cache split into /var/cache/pnpr via
--cache. Default config proxies registry.npmjs.org; listen address and
extra flags via /etc/pnpr/pnpr.env.
40 lines
954 B
Desktop File
40 lines
954 B
Desktop File
[Unit]
|
|
Description=pnpr - pnpm-compatible npm registry server
|
|
Documentation=https://pnpm.io/pnpr
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
ConditionPathExists=/etc/pnpr/pnpr.yaml
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=pnpr
|
|
Group=pnpr
|
|
|
|
# Hosted/published packages (config storage:) persist in /var/lib/pnpr;
|
|
# the disposable mirror of upstream registries goes to /var/cache/pnpr
|
|
# (--cache) and can be wiped at any time.
|
|
StateDirectory=pnpr
|
|
StateDirectoryMode=0750
|
|
CacheDirectory=pnpr
|
|
CacheDirectoryMode=0750
|
|
|
|
EnvironmentFile=/etc/pnpr/pnpr.env
|
|
ExecStart=/usr/bin/pnpr -c /etc/pnpr/pnpr.yaml --cache /var/cache/pnpr --listen ${PNPR_LISTEN} $PNPR_OPTS
|
|
|
|
Restart=on-failure
|
|
RestartSec=5s
|
|
|
|
# Hardening
|
|
NoNewPrivileges=yes
|
|
ProtectSystem=strict
|
|
ProtectHome=yes
|
|
PrivateTmp=yes
|
|
PrivateDevices=yes
|
|
ProtectKernelTunables=yes
|
|
ProtectKernelModules=yes
|
|
ProtectControlGroups=yes
|
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|