mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-03-31 06:24:06 -04:00
* update ping privileged/unprivileged logic, add entrypoint Signed-off-by: invario <67800603+invario@users.noreply.github.com> * Removed entrypoint script, code in GO instead to raise NET_RAW cap Signed-off-by: invario <67800603+invario@users.noreply.github.com> * Rewritten to only split pingdevice func into separate GO files Signed-off-by: invario <67800603+invario@users.noreply.github.com> * remove runtime check * readme: cap_net_raw=+p * clear up * readme: clearify linux only * set `privileged = false` on darwin --------- Signed-off-by: invario <67800603+invario@users.noreply.github.com> Co-authored-by: Maxi Quoß <maxi@quoss.org>
33 lines
1.7 KiB
YAML
33 lines
1.7 KiB
YAML
services:
|
|
upsnap:
|
|
cap_add:
|
|
- NET_RAW # NET_RAW is required for privileged ping
|
|
cap_drop:
|
|
- ALL
|
|
container_name: upsnap
|
|
image: ghcr.io/seriousm4x/upsnap:5 # images are also available on docker hub: seriousm4x/upsnap:5
|
|
network_mode: host # host is required for WOL magic packets
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./data:/app/pb_data
|
|
# # To use a non-root user, create the mountpoint first (mkdir data) so that it has the right permission.
|
|
# user: 1000:1000
|
|
# environment:
|
|
# - TZ=Europe/Berlin # Set container timezone for cron schedules
|
|
# - UPSNAP_HTTP_LISTEN=127.0.0.1:8090
|
|
# - UPSNAP_INTERVAL=*/10 * * * * * # Sets the interval in which the devices are pinged
|
|
# - UPSNAP_SCAN_RANGE=192.168.1.0/24 # Scan range is used for device discovery on local network
|
|
# - UPSNAP_SCAN_TIMEOUT=500ms # Scan timeout is nmap's --host-timeout value to wait for devices (https://nmap.org/book/man-performance.html)
|
|
# - UPSNAP_PING_PRIVILEGED=true # Default is true. Set to false for unprivileged ping
|
|
# For Linux hosts, unprivileged pings REQUIRES the host to set 'sysctl net.ipv4.ping_group_range="0 2147483647"'
|
|
# or another suitable value to grant the group access to send ping and WOL magic packets.
|
|
# - UPSNAP_WEBSITE_TITLE=Custom name # Custom website title
|
|
# security_opt:
|
|
# - no-new-privileges=true
|
|
# # dns is used for name resolution during network scan
|
|
# dns:
|
|
# - 192.18.0.1
|
|
# - 192.18.0.2
|
|
# # or install custom packages for shutdown
|
|
# entrypoint: /bin/sh -c "apk update && apk add --no-cache <YOUR_PACKAGE> && rm -rf /var/cache/apk/* && ./upsnap serve"
|