Files
umbrel-apps/netbird/docker-compose.yml
T
2026-11-12 20:04:00 +00:00

48 lines
1.5 KiB
YAML

version: "3.7"
services:
app_proxy:
environment:
APP_HOST: netbird_web_1
APP_PORT: 80
app:
image: ghcr.io/netbirdio/netbird:0.83.0-rootless@sha256:c8bc0eb582d58b75855400145bfbf453d032e58bd80c046981156614ba1acb46
restart: on-failure
user: "1000:1000"
cap_add:
- NET_ADMIN
- SYS_ADMIN
- SYS_RESOURCE
network_mode: host
volumes:
- ${APP_DATA_DIR}/data/app_data:/var/lib/netbird:rw
# Marks the app page as connected once the device has been activated.
# hooks/post-start only reads the activation code once, when the app starts.
status:
image: ghcr.io/netbirdio/netbird:0.83.0-rootless@sha256:c8bc0eb582d58b75855400145bfbf453d032e58bd80c046981156614ba1acb46
restart: on-failure
user: "1000:1000"
entrypoint: ["/bin/bash", "-c"]
command:
- |
trap 'exit 0' TERM INT
while true; do
if netbird status --json 2>/dev/null | grep -q '"daemonStatus": *"Connected"' \
&& ! grep -q '"status":"connected"' /www/status.json 2>/dev/null; then
echo '{"status":"connected","message":"Connected to NetBird"}' > /www/status.json.tmp
mv -f /www/status.json.tmp /www/status.json
fi
sleep 5 & wait $$!
done
volumes:
- ${APP_DATA_DIR}/data/app_data:/var/lib/netbird:ro
- ${APP_DATA_DIR}/data/www:/www
web:
image: nginx:1.27@sha256:124b44bfc9ccd1f3cedf4b592d4d1e8bddb78b51ec2ed5056c52d3692baebc19
restart: on-failure
volumes:
- ${APP_DATA_DIR}/data/www:/usr/share/nginx/html:ro