Skip to content

Commit 194d46f

Browse files
committed
docs: add requirements.txt and explain why no Docker support
1 parent 4b4863e commit 194d46f

3 files changed

Lines changed: 55 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- **Native Package Distribution:** Official `.deb` and `.rpm` packages for easy installation
1414
- **APT/DNF Repository:** Packages available via GitHub Pages hosted repository for Debian, Ubuntu, RHEL, and Fedora
1515
- **Version CLI Option:** New `-v`/`--version` flag to display current version
16-
- **Version Display:** Version now shown at service startup and during config validation
16+
- **Version Display:** Version now shown at service startup and in notifications
1717
- **nFPM Build System:** Automated package building using nFPM for both Debian and RPM formats
1818
- **GitHub Release Automation:** Packages automatically built and published on GitHub releases
19-
- **GPG Signed Packages:** All repository metadata is GPG signed for security
19+
- **GPG Signed Repository:** Repository metadata is GPG signed for security
20+
- **requirements.txt:** Added for pip-based installations (`PyYAML>=5.4.1`, `apprise>=1.9.6`)
21+
- **No Docker Documentation:** Explained why Eneru runs as a systemd daemon (chicken-and-egg problem with container shutdown)
2022

2123
### Changed
24+
- **Service Name:** Renamed from `ups-monitor.service` to `eneru.service` to avoid conflict with nut-client's service
2225
- **Installation Method:** Package installation (deb/rpm) is now the recommended method
2326
- **Service Behavior:** Packages install but do not auto-enable or auto-start the service (config must be edited first)
2427
- **Config File Handling:** Package upgrades preserve existing `/etc/ups-monitor/config.yaml` (marked as conffile)
28+
- **Upgrade Behavior:** Smart detection ensures running service restarts on upgrade, stopped service stays stopped
2529
- **Service File Location:** Moved from `/etc/systemd/system/` to `/lib/systemd/system/` for proper package management
26-
- **`__version__` Variable:** Version now embedded in source code and updated at build time from git tags
2730

2831
### Fixed
2932
- **Discord Mention Prevention:** Added zero-width space after `@` symbols in notification messages to prevent Discord from interpreting UPS names (e.g., `[email protected]`) as user mentions
33+
- **APT Repository Structure:** Proper `dists/stable/main/binary-all/` hierarchy for Debian/Ubuntu compatibility
34+
- **RPM Repository GPG:** Fixed gpgcheck configuration (repo metadata signed, individual packages served over HTTPS)
35+
36+
### Migration from v4.2
37+
38+
If you installed manually, update your systemd service reference:
39+
```bash
40+
# Stop old service
41+
sudo systemctl stop ups-monitor.service
42+
sudo systemctl disable ups-monitor.service
43+
44+
# Remove old service file
45+
sudo rm /etc/systemd/system/ups-monitor.service
46+
47+
# Install new package (recommended) or copy new service file
48+
sudo cp eneru.service /etc/systemd/system/
49+
sudo systemctl daemon-reload
50+
sudo systemctl enable eneru.service
51+
sudo systemctl start eneru.service
52+
```
3053

3154
### Installation
3255

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,22 @@ Most UPS shutdown solutions are **single-system focused**. Eneru is designed for
6262

6363
---
6464

65+
## 🤔 Why an Old-Fashioned Systemd Daemon? (No Docker)
66+
67+
You might wonder why Eneru runs as a traditional systemd service instead of a container. This is intentional:
68+
69+
**The Chicken-and-Egg Problem:** Eneru's job is to gracefully shut down Docker/Podman containers during power events. If Eneru itself ran inside a container, it would be stopped during its own shutdown sequence—potentially stalling the entire process and leaving the host in an undefined state.
70+
71+
Running as a systemd daemon ensures:
72+
- **Eneru survives container shutdown** - It can orchestrate the full sequence without being killed
73+
- **Direct host access** - Native access to systemd, virsh, SSH, and filesystem operations
74+
- **Reliability** - No container runtime dependency that could fail during a power event
75+
- **Simplicity** - While it's technically possible to code Eneru to run inside a container (with careful self-exclusion logic during shutdown), this would significantly increase codebase complexity and still introduce the possibility that something goes wrong—leaving Eneru unable to complete its job
76+
77+
This is the same reason critical infrastructure services like NUT itself run as system daemons, not containers.
78+
79+
---
80+
6581
## Features
6682

6783
### High-Performance Monitoring

requirements.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Eneru - Python Dependencies
2+
#
3+
# Install with: pip install -r requirements.txt
4+
#
5+
# Note: For production use, prefer system packages (apt/dnf) over pip
6+
# to ensure proper integration with system Python and security updates.
7+
8+
# Required
9+
PyYAML>=5.4.1
10+
11+
# Optional - for notifications (100+ services via Apprise)
12+
# Remove this line if you don't need notifications
13+
apprise>=1.9.6

0 commit comments

Comments
 (0)