mirror of
https://github.com/mayanayza/netvisor.git
synced 2025-12-10 08:24:08 -06:00
75 lines
1.9 KiB
YAML
75 lines
1.9 KiB
YAML
services:
|
|
ui:
|
|
build:
|
|
context: ./ui
|
|
dockerfile: Dockerfile.dev
|
|
volumes:
|
|
- ./ui:/app
|
|
- /app/node_modules
|
|
ports:
|
|
- "5173:5173"
|
|
|
|
server:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile.dev
|
|
ports:
|
|
- "60072:60072"
|
|
environment:
|
|
- RUST_LOG=debug
|
|
- NETVISOR_DATABASE_PATH=/data/netvisor.db
|
|
- NETVISOR_WEB_EXTERNAL_PATH=/app/static
|
|
volumes:
|
|
- ./backend:/app
|
|
- ./data:/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: 10s
|
|
|
|
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 watch -x 'run --bin daemon'"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:60073/health"]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
volumes:
|
|
ui-build:
|
|
cargo-cache:
|
|
cargo-git:
|
|
target-cache: |