Owner decision 2026-10-07: production's mongod becomes a one-member replica set (rs0), so that a backup can read every collection at one instant (a snapshot read session), which a standalone mongod can't. The unit runs mongod with --replSet rs0 and a 990 MB oplog; setup.sh converts it once, idempotently (PrivaPub stopped, mongod restarted, rs.initiate, the primary awaited, PrivaPub started); every connection string says directConnection=true, which works against the standalone too, so this code can deploy before the conversion. The CI's throwaway mongod and the pasture's are replica sets as well, so the snapshot path is what the tests exercise; MongoTopology tells which a mongod is, and TopologyTests holds the test mongod to it. The suite passes on it (906). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
18 lines
523 B
Desktop File
18 lines
523 B
Desktop File
[Unit]
|
|
Description=PrivaPub's own mongod (127.0.0.1:27022)
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=exec
|
|
User=www-data
|
|
Group=www-data
|
|
# a one-member replica set (rs0), so a backup reads every collection at one instant; its oplog kept small
|
|
ExecStart=/usr/bin/mongod --dbpath /var/lib/privapub/mongo --port 27022 --bind_ip 127.0.0.1 --noauth --wiredTigerCacheSizeGB 0.25 --replSet rs0 --oplogSizeMB 990 --quiet
|
|
Restart=always
|
|
RestartSec=5
|
|
LimitNOFILE=64000
|
|
SyslogIdentifier=privapub-mongod
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|