-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
executable file
·55 lines (48 loc) · 3.14 KB
/
docker-compose.yaml
File metadata and controls
executable file
·55 lines (48 loc) · 3.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
services:
nut:
# Container image
image: dartsteven/nutify:latest-amd64 # Nutify image version
container_name: Nutify # Static container name for easy reference
# Privileges required for
# direct UPS and USB device access
privileged: true # Broad hardware access for NUT and USB integration
cap_add:
- SYS_ADMIN # Extended system administration capabilities
- SYS_RAWIO # Raw hardware I/O access
- MKNOD # Create special device files if needed
# USB device mapping
devices:
- /dev/bus/usb:/dev/bus/usb:rwm # Map host USB bus into the container
device_cgroup_rules:
- 'c 189:* rwm' # Allow all USB character devices
# Persistent storage and host integration
volumes:
- ./Nutify/logs:/app/nutify/logs # Application logs
- ./Nutify/instance:/app/nutify/instance # Persistent app data and runtime files
- ./Nutify/ssl:/app/ssl # SSL certificates and private keys
- ./Nutify/etc/nut:/etc/nut # NUT configuration directory
- /dev:/dev:rw # Full device tree access for hardware detection
- /run/udev:/run/udev:ro # Udev event access for hotplug monitoring
# Runtime environment
environment:
- SECRET_KEY=test1234567890 # Secret key used for sessions and encrypted values
- UDEV=1 # Enable udev-aware USB detection mode
- LOG=true # Enable general application logging: true or false, default is false if not set
- LOG_LEVEL=INFO # Accepted values currently are DEBUG, INFO, WARNING, ERROR, CRITICAL
- LOG_WERKZEUG=true # Enable Werkzeug HTTP/server logs: true or false, default is false
- ENABLE_LOG_STARTUP=Y # Enable startup logs: valid values are Y or N, default is N, any other value is treated as N
- SSL_ENABLED=false # true or false, default is false
# DNS resolvers
dns:
- 1.1.1.1 # Cloudflare DNS
- 8.8.8.8 # Google DNS
dns_opt:
- timeout:2 # DNS timeout per query
- attempts:2 # Retry count before failure
# Exposed ports
ports:
- 3493:3493 # NUT daemon communication port
- 5050:5050 # Nutify application port
- 443:443 # HTTPS secure web access
restart: always # Keep the service running across failures/reboots
user: root # Root required for full device and NUT access