version: "3.7" services: app_proxy: environment: APP_HOST: netbird_web_1 APP_PORT: 80 app: image: ghcr.io/netbirdio/netbird:0.83.2-rootless@sha256:23acf9191db22ba009e336496806381fa2311649609982d72cb722e5e97c3a43 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.2-rootless@sha256:23acf9191db22ba009e336496806381fa2311649609982d72cb722e5e97c3a43 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.30.7-alpine@sha256:bef154735288bc38d99fac41ae63730684bcc661503673a04a0f9bc526ba8598 restart: on-failure volumes: - ${APP_DATA_DIR}/data/www:/usr/share/nginx/html:ro