mirror of
https://github.com/getumbrel/umbrel-apps.git
synced 2026-11-25 15:15:02 +03:00
48 lines
1.5 KiB
YAML
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.82.1-rootless@sha256:56e6dfcce7853128dab106f3651412cae599e1580b4eee3f0a0c873b4f565ccd
|
|
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.82.1-rootless@sha256:56e6dfcce7853128dab106f3651412cae599e1580b4eee3f0a0c873b4f565ccd
|
|
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
|