Lets the MSP admin control NetBird's own "Settings > Clients > Automatic Updates" feature (client/peer auto-update, v0.61.0+) for every customer from one place, instead of logging into each customer's dashboard individually. - New deployments automatically capture a Personal Access Token during the existing /api/setup bootstrap call (create_pat=true), requiring NB_SETUP_PAT_ENABLED=true on the management container (now set by default in the compose template). Token is encrypted at rest per customer. - Existing customers (deployed before this existed) can have a token pasted in manually from their own dashboard — verified before being stored. - Settings > Docker Images: master default (version + force-update toggle) plus "Apply to All Customers" which pushes it to everyone with a token. - Customer detail page: shows the customer's live current setting (read from their NetBird API, not cached) with per-customer override or "sync from default". - New app/services/netbird_client_update_service.py wraps the customer's NetBird Management API (GET/PUT /api/accounts) for this.
75 lines
2.1 KiB
Django/Jinja
75 lines
2.1 KiB
Django/Jinja
networks:
|
|
{{ docker_network }}:
|
|
external: true
|
|
|
|
services:
|
|
# --- Caddy Reverse Proxy (entry point) ---
|
|
netbird-caddy:
|
|
image: caddy:2-alpine
|
|
container_name: netbird-{{ subdomain }}-caddy
|
|
restart: unless-stopped
|
|
networks:
|
|
- {{ docker_network }}
|
|
ports:
|
|
- "{{ dashboard_port }}:80"
|
|
volumes:
|
|
- {{ instance_dir }}/Caddyfile:/etc/caddy/Caddyfile:ro
|
|
|
|
# --- NetBird Management (with embedded IdP) ---
|
|
netbird-management:
|
|
image: {{ netbird_management_image }}
|
|
container_name: netbird-{{ subdomain }}-management
|
|
restart: unless-stopped
|
|
environment:
|
|
# Allows the MSP appliance to request a Personal Access Token during the
|
|
# one-time /api/setup bootstrap call. The endpoint itself locks down
|
|
# (412) as soon as the first user exists, so leaving this on is safe.
|
|
- NB_SETUP_PAT_ENABLED=true
|
|
networks:
|
|
- {{ docker_network }}
|
|
volumes:
|
|
- {{ instance_dir }}/data/management:/var/lib/netbird
|
|
- {{ instance_dir }}/management.json:/etc/netbird/management.json
|
|
command:
|
|
- "--port"
|
|
- "80"
|
|
- "--log-file"
|
|
- "console"
|
|
- "--log-level"
|
|
- "info"
|
|
- "--single-account-mode-domain={{ netbird_domain }}"
|
|
- "--dns-domain={{ netbird_domain }}"
|
|
- "--idp-sign-key-refresh-enabled"
|
|
|
|
# --- NetBird Signal ---
|
|
netbird-signal:
|
|
image: {{ netbird_signal_image }}
|
|
container_name: netbird-{{ subdomain }}-signal
|
|
restart: unless-stopped
|
|
networks:
|
|
- {{ docker_network }}
|
|
volumes:
|
|
- {{ instance_dir }}/data/signal:/var/lib/netbird
|
|
|
|
# --- NetBird Relay ---
|
|
netbird-relay:
|
|
image: {{ netbird_relay_image }}
|
|
container_name: netbird-{{ subdomain }}-relay
|
|
restart: unless-stopped
|
|
networks:
|
|
- {{ docker_network }}
|
|
ports:
|
|
- "{{ relay_udp_port }}:3478/udp"
|
|
env_file:
|
|
- {{ instance_dir }}/relay.env
|
|
|
|
# --- NetBird Dashboard ---
|
|
netbird-dashboard:
|
|
image: {{ netbird_dashboard_image }}
|
|
container_name: netbird-{{ subdomain }}-dashboard
|
|
restart: unless-stopped
|
|
networks:
|
|
- {{ docker_network }}
|
|
env_file:
|
|
- {{ instance_dir }}/dashboard.env
|