Skip to content

Latest commit

 

History

History
65 lines (41 loc) · 1.62 KB

File metadata and controls

65 lines (41 loc) · 1.62 KB

Docker Guide for CVE-Monitor

A simplified guide to running CVE-Monitor with Docker.

Prerequisites

Quick Start

  1. Set Environment Variables (optional)

    You can create a .env file in the root directory to store your API keys and other settings. Start by copying the example file:

    cp .env.example .env

    Then, edit the .env file with your personal settings:

    vim .env

    Alternatively, you can export them as environment variables:

    export NVD_API_KEY=your_nvd_api_key
    export GITHUB_TOKEN=your_github_token
  2. Start the Application

    docker-compose up -d

    The application will be available at http://localhost:5000

  3. Other Useful Commands

    # Stop the application
    docker-compose down
    
    # View logs
    docker-compose logs -f
    
    # Synchronize the CVE database
    docker-compose exec cve-monitor ./docker-sync.sh

Data Persistence

The application uses a Docker volume (cve-data) to persist the SQLite database. This ensures that your data is preserved even if you rebuild or delete the container.

Environment Variables

Three variables can be configured:

  • NVD_API_KEY: NVD API key to access the vulnerability database.
  • GITHUB_TOKEN: GitHub token for vulnerability searches.
  • DB_PATH: Path to the database (default: /app/data/cve_database.db).

The docker-init.sh script will automatically detect if a .env file exists and create one from .env.example if necessary.