- New caching_custom_backfill_jobs and caching_custom_backfill_batches tables - Admin API (POST create/cancel, GET list) at admin/api/custom_backfill.php - Admin UI form with preset buttons and job status table on Backfill page - Caching daemon module (custom_backfill.c) processes jobs independently - pg_inbox functions for job/batch claim, progress update, and cancel - Three batch modes: author-batched, id-batched, time-window scan - Fixed done_batches overcount on job completion - Admin config now environment-variable driven (C_RELAY_DB_*) - admin/serve.sh supports separate instances for different databases - make_and_restart_relay.sh only kills relay on target port, not all relays
47 lines
1.4 KiB
Desktop File
47 lines
1.4 KiB
Desktop File
[Unit]
|
|
Description=C Nostr Relay Server (PostgreSQL Backend) - Local Production on port 7777
|
|
Documentation=https://github.com/your-repo/c-relay-pg
|
|
After=network.target network-online.target postgresql.service
|
|
Wants=network-online.target
|
|
Requires=postgresql.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=user
|
|
Group=user
|
|
WorkingDirectory=/home/user/Storage/c_relay_pg
|
|
ExecStart=/home/user/Storage/c_relay_pg/crelay --debug-level=0 -p 7777 --strict-port --auto-start-caching --db-host 127.0.0.1 --db-name crelay_prod --db-user crelay --db-password crelay
|
|
Restart=always
|
|
RestartSec=5
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=c-relay-pg-local
|
|
|
|
# Security settings
|
|
NoNewPrivileges=true
|
|
ProtectSystem=strict
|
|
ProtectHome=false
|
|
ReadWritePaths=/home/user/Storage/c_relay_pg
|
|
PrivateTmp=true
|
|
ProtectKernelTunables=true
|
|
ProtectKernelModules=true
|
|
ProtectControlGroups=true
|
|
|
|
# Network security
|
|
PrivateNetwork=false
|
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
|
|
|
# Resource limits
|
|
LimitNOFILE=65536
|
|
LimitNPROC=4096
|
|
|
|
# Event-based configuration system
|
|
# No config files needed - configuration is stored as signed Nostr events
|
|
# Database files (<relay_pubkey>.db) are created by the relay in WorkingDirectory
|
|
# Admin private key is shown once on first startup only
|
|
# This instance uses the crelay_prod database, fully isolated from the
|
|
# test relay (port 8888, crelay database) run by make_and_restart_relay.sh
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|