-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (48 loc) · 2.19 KB
/
Copy pathdocker-compose.yml
File metadata and controls
58 lines (48 loc) · 2.19 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
56
57
58
# Example docker-compose.yml for local testing and development
services:
nut-cgi:
# This file is a local testing example, so it tracks :latest.
# For production, pin an exact released version instead -- see the
# "Version Pinning" section of README.md. Renovate ignores this file
# (see ignorePaths in .github/renovate.json), so a digest pinned here
# would never be refreshed.
image: ghcr.io/owine/nut-cgi:latest
# Run as non-root user (UID 1000 by default)
user: "1000:1000"
# Security: Read-only root filesystem
read_only: true
# Security: Prevent privilege escalation
security_opt:
- no-new-privileges:true
# Security: Drop all Linux capabilities
cap_drop:
- ALL
# Security: Writable temp space for PIDs and logs
tmpfs:
- /tmp
# Environment variables
environment:
# Health check mode: 'basic' (default) or 'strict'
# basic = Validate infrastructure only (web server + CGI)
# strict = Validate infrastructure + UPS connectivity
- HEALTHCHECK_MODE=basic
# WARNING: upsset.cgi allows UPS configuration changes (shutdown, etc.)
# Only enable behind an authenticated reverse proxy.
# - ENABLE_UPSSET=true
#
# Content-Security-Policy. Defaults to a strict policy suited to the stock
# interface. Override when something downstream injects into the page --
# e.g. Cloudflare Web Analytics adds its beacon at the edge, after the
# response has left this container. Replaces the header wholesale, so
# restate the directives you want to keep. CSP_POLICY=none omits the
# header entirely (let a reverse proxy own the policy).
# - CSP_POLICY: "default-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self' https://static.cloudflareinsights.com; connect-src 'self' https://cloudflareinsights.com"
# Mount your hosts.conf configuration
volumes:
- ./hosts.conf:/etc/nut/hosts.conf:ro
# NOTE: Exposes plain HTTP. In production, deploy behind a reverse proxy
# (e.g., Traefik, nginx) that provides TLS termination and authentication.
ports:
- "8000:80"
# Restart policy
restart: unless-stopped