Files

78 lines
2.0 KiB
YAML

services:
netbird-mgmt:
image: ${NB_MANAGEMENT_IMAGE:-netbirdio/management:latest}
environment:
- NB_LOG_LEVEL=debug
- NETBIRD_STORE_ENGINE=sqlite
volumes:
- ./seed_database.sql:/app/seed_database.sql
- ./management.json:/etc/netbird/management.json
- ./setup_mgmt.sh:/etc/netbird/setup_mgmt.sh
- netbird_data:/var/lib/netbird
entrypoint: []
command:
- /bin/bash
- -c
- /etc/netbird/setup_mgmt.sh & /go/bin/netbird-mgmt management --log-file console
networks:
transfer_net:
ipv4_address: 192.168.1.10
healthcheck:
test: [ "CMD", "sh", "-c", "grep -q '0:0050' /proc/net/tcp*" ]
interval: 3s
timeout: 1s
retries: 10
ports:
# local debugging only
- "8080:80"
netbird-proxy:
image: ${NB_PROXY_IMAGE:-netbirdio/reverse-proxy:latest}
entrypoint:
- sh
- -c
- |
echo "Waiting for proxy token..."
while [ ! -f /var/lib/netbird/proxy.env ]; do sleep 1; done
. /var/lib/netbird/proxy.env
export NB_PROXY_TOKEN
echo "Starting proxy with token"
exec /go/bin/netbird-proxy
environment:
- NB_PROXY_MANAGEMENT_ADDRESS=http://192.168.1.10:80
- NB_PROXY_DOMAIN=external.test
- NB_PROXY_ADDRESS=:8443
- NB_PROXY_ACME_CERTIFICATES=true
- NB_PROXY_ALLOW_INSECURE=true
- NB_PROXY_DEBUG_LOGS=true
- NB_PROXY_HEALTH_ADDRESS=0.0.0.0:9090
- NB_PROXY_WG_PORT=0
volumes:
- netbird_data:/var/lib/netbird
networks:
transfer_net:
ipv4_address: 192.168.1.11
depends_on:
netbird-mgmt:
condition: service_healthy
healthcheck:
test: [ "CMD", "wget", "-q", "--spider", "http://127.0.0.1:9090" ]
interval: 3s
timeout: 1s
retries: 10
networks:
transfer_net:
ipam:
config:
- subnet: 192.168.1.0/24
volumes:
netbird_data:
name: "netbird_data_${COMPOSE_PROJECT_NAME:-default}_tmp"
external: false
driver: local
driver_opts:
type: tmpfs
device: tmpfs