compose: NetBird sidecar service (netbird profile, setup-key auth)
Shares gatus's network namespace (network_mode: service:gatus) so mesh routes apply to gatus directly — same semantics as the k8s sidecar. Enable with COMPOSE_PROFILES=postgres,netbird + NETBIRD_SETUP_KEY in .env.
This commit is contained in:
parent
9254cbaf6b
commit
133127c4d0
2 changed files with 34 additions and 2 deletions
11
.env.example
11
.env.example
|
|
@ -1,8 +1,9 @@
|
|||
# R2D2-Status environment — copy to .env and fill in secrets.
|
||||
# docker compose reads .env automatically; use `--env-file .env.local` for local dev.
|
||||
|
||||
# Compose profiles: "postgres" runs the bundled database. Leave empty to run
|
||||
# gatus alone (set GATUS_STORAGE_TYPE=sqlite or memory in that case).
|
||||
# Compose profiles: "postgres" runs the bundled database ("postgres,netbird"
|
||||
# also joins the VPN mesh). Leave empty to run gatus alone (set
|
||||
# GATUS_STORAGE_TYPE=sqlite or memory in that case).
|
||||
COMPOSE_PROFILES=postgres
|
||||
|
||||
# Image / publishing
|
||||
|
|
@ -26,3 +27,9 @@ GATUS_STORAGE_TYPE=postgres
|
|||
POSTGRES_USER=gatus
|
||||
POSTGRES_PASSWORD=CHANGE_ME
|
||||
POSTGRES_DB=gatus
|
||||
|
||||
# NetBird VPN sidecar (netbird profile only) — reusable server setup key from
|
||||
# the NetBird admin console (Setup Keys). Never a PAT.
|
||||
NETBIRD_SETUP_KEY=
|
||||
#NETBIRD_MANAGEMENT_URL=https://netbird.office.ilab.zone:33073
|
||||
#NETBIRD_HOSTNAME=r2d2-status-compose
|
||||
|
|
|
|||
|
|
@ -24,6 +24,30 @@ services:
|
|||
# Ignored when the postgres profile is disabled (sqlite/memory mode)
|
||||
required: false
|
||||
|
||||
# NetBird VPN sidecar — joins gatus's network namespace so gatus can reach
|
||||
# 100.85.x.x mesh peers. Setup-key auth only (no PAT). Enable by adding
|
||||
# "netbird" to COMPOSE_PROFILES and setting NETBIRD_SETUP_KEY in .env.
|
||||
netbird:
|
||||
image: netbirdio/netbird:latest
|
||||
profiles: ["netbird"]
|
||||
restart: unless-stopped
|
||||
network_mode: "service:gatus"
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
devices:
|
||||
- /dev/net/tun
|
||||
environment:
|
||||
NB_SETUP_KEY: ${NETBIRD_SETUP_KEY:-}
|
||||
NB_MANAGEMENT_URL: ${NETBIRD_MANAGEMENT_URL:-https://netbird.office.ilab.zone:33073}
|
||||
NB_HOSTNAME: ${NETBIRD_HOSTNAME:-r2d2-status-compose}
|
||||
NB_WG_MODE: userspace
|
||||
NB_MTU: "1280"
|
||||
NB_DISABLE_DNS: "true"
|
||||
volumes:
|
||||
- netbird-state:/var/lib/netbird
|
||||
depends_on:
|
||||
- gatus
|
||||
|
||||
postgres:
|
||||
image: postgres:17-alpine
|
||||
profiles: ["postgres"]
|
||||
|
|
@ -42,4 +66,5 @@ services:
|
|||
|
||||
volumes:
|
||||
gatus-data:
|
||||
netbird-state:
|
||||
postgres-data:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue