Skip to content

Improve onboarding #1541

@bilogic

Description

@bilogic

What installation are you running?

Production (netalertx) 📦

Did I research?

The issue occurs in the following browsers. Select at least 2.

  • Firefox
  • Chrome
  • Other (unsupported) - PRs welcome
  • N/A - This is an issue with the backend

What I want to do

From #1540, I want to see devices or some errors after docker compose up -d, but I'm seeing 0 devices for about 30 minutes and not much idea if there are any issues or what is going on

Relevant settings you changed

None, only removed 3 logging lines from the Baseline Docker Compose (https://docs.netalertx.com/DOCKER_COMPOSE/) docker-compose.yaml because I'm using dockge which uses journald

    logging:
      options:
        max-size: "10m"         # Rotate log files after they reach 10MB
        max-file: "3"           # Keep a maximum of 3 log files

docker-compose.yml

services:
  netalertx:
    #use an environmental variable to set host networking mode if needed
    container_name: netalertx # The name when you docker contiainer ls
    image: ghcr.io/netalertx/netalertx:latest
    network_mode: ${NETALERTX_NETWORK_MODE:-host} # Use host networking for ARP scanning and other services
    read_only: true # Make the container filesystem read-only
    cap_drop:
      # Drop all capabilities for enhanced security
      - ALL
    cap_add:
      # Add only the necessary capabilities
      - NET_ADMIN # Required for ARP scanning
      - NET_RAW # Required for raw socket operations
      - NET_BIND_SERVICE # Required to bind to privileged ports (nbtscan)
      - CHOWN # Required for root-entrypoint to chown /data + /tmp before dropping privileges
      - SETUID # Required for root-entrypoint to switch to non-root user
      - SETGID # Required for root-entrypoint to switch to non-root group
    volumes:
      - type: volume
        source: netalertx_data
        target: /data
        read_only: false
      # Example custom local folder called /home/user/netalertx_data
      # - type: bind
      #   source: /home/user/netalertx_data
      #   target: /data
      #   read_only: false
      # ... or use the alternative format
      # - /home/user/netalertx_data:/data:rw

      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
      # Mount your DHCP server file into NetAlertX for a plugin to access
      # - path/on/host/to/dhcp.file:/resources/dhcp.file

      # tmpfs mount consolidates writable state for a read-only container and improves performance
      # uid/gid default to the service user (NETALERTX_UID/GID, default 20211)
      # mode=1700 grants rwx------ permissions to the runtime user only
    tmpfs:
      # Comment out to retain logs between container restarts - this has a server performance impact.
      - /tmp:uid=${NETALERTX_UID:-20211},gid=${NETALERTX_GID:-20211},mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime
      # Retain logs - comment out tmpfs /tmp if you want to retain logs between container restarts
      # Please note if you remove the /tmp mount, you must create and maintain sub-folder mounts.
      # - /path/on/host/log:/tmp/log
      # - "/tmp/api:uid=${NETALERTX_UID:-20211},gid=${NETALERTX_GID:-20211},mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
      # - "/tmp/nginx:uid=${NETALERTX_UID:-20211},gid=${NETALERTX_GID:-20211},mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
      # - "/tmp/run:uid=${NETALERTX_UID:-20211},gid=${NETALERTX_GID:-20211},mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"

    environment:
      LISTEN_ADDR: ${LISTEN_ADDR:-0.0.0.0} # Listen for connections on all interfaces
      PORT: ${PORT:-20211} # Application port
      GRAPHQL_PORT: ${GRAPHQL_PORT:-20212} # GraphQL API port (passed into APP_CONF_OVERRIDE at runtime)
    #    NETALERTX_DEBUG: ${NETALERTX_DEBUG:-0}                 # 0=kill all services and restart if any dies. 1 keeps running dead services.
    #    PUID: 20211                             # Runtime PUID override, set to 0 to run as root
    #    PGID: 20211                             # Runtime PGID override

    # Resource limits to prevent resource exhaustion
    mem_limit: 2048m # Maximum memory usage
    mem_reservation: 1024m # Soft memory limit
    cpu_shares: 512 # Relative CPU weight for CPU contention scenarios
    pids_limit: 512 # Limit the number of processes/threads to prevent fork bombs
    # Always restart the container unless explicitly stopped
    restart: unless-stopped
volumes:
  # Persistent volume for configuration and database storage
  netalertx_data: null

app.log

will provide after i tear down again and restart fresh

Debug enabled

  • I have read and followed the steps in the wiki link above and provided the required debug logs and the log section covers the time when the issue occurs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Setup 📥These are probably setup or user environment related issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions