favoritter/nfpm.yaml
Ole-Morten Duesund 1fc42bf1b2 feat: add packaging, deployment, error pages, and project docs
Phase 7 — Polish:
- Error page template with styled 404/403/500 pages
- Error rendering helper on Renderer

Phase 8 — Packaging & Deployment:
- Containerfile: multi-stage build, non-root user, health check,
  OCI labels with build date and git revision
- Makefile: build, test, cross-compile, deb, rpm, container,
  tarballs, checksums targets
- nfpm.yaml: .deb and .rpm package config
- systemd service: hardened with NoNewPrivileges, ProtectSystem,
  ProtectHome, PrivateTmp, RestrictSUIDSGID
- Default environment file with commented examples
- postinstall/preremove scripts (shellcheck validated)
- compose.yaml: example Podman/Docker Compose
- Caddyfile.example: subdomain, subpath, and remote proxy configs
- CHANGELOG.md for release notes
- CLAUDE.md with architecture, conventions, and quick reference

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 16:34:32 +02:00

52 lines
1.2 KiB
YAML

# nfpm configuration for building .deb and .rpm packages.
# https://nfpm.goreleaser.com/
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# Usage:
# ARCH=amd64 VERSION=1.0.0 nfpm package --packager deb --target dist/
# ARCH=arm64 VERSION=1.0.0 nfpm package --packager rpm --target dist/
name: favoritter
arch: "${ARCH}"
platform: linux
version: "${VERSION}"
maintainer: "Ole M. <olemd@kode.naiv.no>"
description: "Self-hosted favorites web app"
vendor: ""
homepage: "https://kode.naiv.no/olemd/favoritter"
license: AGPL-3.0-or-later
contents:
- src: ./dist/favoritter_${VERSION}_linux_${ARCH}
dst: /usr/bin/favoritter
file_info:
mode: 0755
- src: ./dist/favoritter.service
dst: /lib/systemd/system/favoritter.service
- src: ./dist/favoritter.env
dst: /etc/favoritter/favoritter.env
type: config|noreplace
- dst: /var/lib/favoritter
type: dir
file_info:
mode: 0750
owner: favoritter
group: favoritter
- dst: /var/lib/favoritter/uploads
type: dir
file_info:
mode: 0750
owner: favoritter
group: favoritter
scripts:
postinstall: ./dist/postinstall.sh
preremove: ./dist/preremove.sh
overrides:
deb:
depends:
- libc6
rpm:
depends:
- glibc