mirror of
https://github.com/mayanayza/netvisor.git
synced 2025-12-10 08:24:08 -06:00
112 lines
2.7 KiB
YAML
112 lines
2.7 KiB
YAML
services:
|
|
ui:
|
|
build:
|
|
context: ./ui
|
|
dockerfile: Dockerfile.dev
|
|
volumes:
|
|
- ./ui:/app
|
|
- /app/node_modules
|
|
ports:
|
|
- "5173:5173"
|
|
networks:
|
|
netvisor-dev:
|
|
ipv4_address: 172.25.0.2
|
|
|
|
server:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile.dev
|
|
ports:
|
|
- "60072:60072"
|
|
environment:
|
|
- RUST_LOG=debug,sqlx=off,tower_http=off
|
|
- NETVISOR_DATABASE_PATH=/data/netvisor.db
|
|
- NETVISOR_WEB_EXTERNAL_PATH=/app/static
|
|
volumes:
|
|
- ./backend:/app
|
|
- data-volume:/data
|
|
- ui-build:/app/static:ro
|
|
- cargo-cache:/usr/local/cargo/registry
|
|
- cargo-git:/usr/local/cargo/git
|
|
- target-cache:/app/target
|
|
depends_on:
|
|
- ui
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:60072/api/health"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
start_period: 60s
|
|
networks:
|
|
netvisor-dev:
|
|
ipv4_address: 172.25.0.3
|
|
|
|
daemon:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile.dev
|
|
privileged: true
|
|
restart: unless-stopped
|
|
depends_on:
|
|
server:
|
|
condition: service_healthy
|
|
environment:
|
|
# Server connection
|
|
- NETVISOR_SERVER_TARGET=${NETVISOR_SERVER_TARGET:-server}
|
|
- NETVISOR_SERVER_PORT=${NETVISOR_SERVER_PORT:-60072}
|
|
|
|
# Daemon configuration
|
|
- NETVISOR_PORT=${NETVISOR_PORT:-60073}
|
|
- NETVISOR_BIND_ADDRESS=${NETVISOR_BIND_ADDRESS:-0.0.0.0}
|
|
- NETVISOR_NAME=${NETVISOR_NAME:-netvisor-daemon}
|
|
- NETVISOR_LOG_LEVEL=${NETVISOR_LOG_LEVEL:-info}
|
|
- NETVISOR_HEARTBEAT_INTERVAL=${NETVISOR_HEARTBEAT_INTERVAL:-30}
|
|
volumes:
|
|
- ./backend:/app
|
|
- ./data/daemon_config:/root/.config/daemon
|
|
- cargo-cache:/usr/local/cargo/registry
|
|
- cargo-git:/usr/local/cargo/git
|
|
- target-cache:/app/target
|
|
command: sh -c "cargo run --bin daemon"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f http://localhost:60073/api/health || exit 1"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 15
|
|
start_period: 60s
|
|
networks:
|
|
netvisor-dev:
|
|
ipv4_address: 172.25.0.4
|
|
|
|
homeassistant:
|
|
image: lscr.io/linuxserver/homeassistant:latest
|
|
container_name: homeassistant-discovery
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=America/New_York
|
|
volumes:
|
|
- homeassistant-config:/config
|
|
ports:
|
|
- 8123:8123
|
|
restart: unless-stopped
|
|
networks:
|
|
netvisor-dev:
|
|
ipv4_address: 172.25.0.5
|
|
|
|
volumes:
|
|
ui-build:
|
|
cargo-cache:
|
|
cargo-git:
|
|
target-cache:
|
|
data-volume:
|
|
daemon-config-volume:
|
|
homeassistant-config:
|
|
|
|
networks:
|
|
netvisor-dev:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.25.0.0/28
|
|
gateway: 172.25.0.1 |