nut-server

This commit is contained in:
JamesTurland
2026-02-06 15:59:24 +00:00
parent c2cfd73577
commit 4ac0426a65
2 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
services:
nut:
image: dartsteven/nutify:arm64-latest # Use amd64-latest or armv7-latest based on your architecture
container_name: Nutify
privileged: true
cap_add:
- SYS_ADMIN
- SYS_RAWIO
- MKNOD
devices:
- /dev/bus/usb:/dev/bus/usb:rwm
device_cgroup_rules:
- 'c 189:* rwm'
volumes:
- ./Nutify/logs:/app/nutify/logs
- ./Nutify/instance:/app/nutify/instance
- ./Nutify/ssl:/app/ssl
- ./Nutify/etc/nut:/etc/nut
- /dev:/dev:rw # Full /dev access improves hotplug handling
- /run/udev:/run/udev:ro # Access to udev events
environment:
- SECRET_KEY=mypassword # for password encryption and decryption in the database
- UDEV=1 # Improve USB detection
ports:
- 3493:3493
- 5050:5050
- 443:443
restart: always
user: root

View File

@@ -0,0 +1,22 @@
services:
nut-upsd:
image: instantlinux/nut-upsd
container_name: nut-upsd
devices:
- /dev/bus/usb
restart: unless-stopped
peanut:
image: brandawg93/peanut:latest
container_name: PeaNUT
ports:
- 8080:8080
restart: unless-stopped
volumes:
- ./config:/config
environment:
- WEB_PORT=8080
networks:
default:
name: nut_network