NextAudit AI’s persistence layer is built around three databases, each serving a distinct role. PostgreSQL handles AI embedding storage and Flowise metadata using the pgvector extension. MySQL provides the relational backend that FleetDM requires for host inventory and policy state. Redis delivers the fast in-memory caching and session storage that FleetDM depends on for live queries and distributed coordination.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Kevin2523/nextAuditAi/llms.txt
Use this file to discover all available pages before exploring further.
PostgreSQL — AI embeddings and Flowise
PostgreSQL is a custom-built image that packages thepgvector extension alongside the standard PostgreSQL 14 runtime. The EMBEDDING_SIZE environment variable is passed into the container at startup and used to configure the vector column dimensions when the schema is initialized.
Image
- Development
- Production / Test
In development, PostgreSQL is built from the local
./postgres context, which applies the custom pgvector installation and any initialization scripts:Full service definition
Environment variables
| Variable | Description |
|---|---|
POSTGRES_USER | Superuser and application user created on first init |
POSTGRES_PASSWORD | Password for POSTGRES_USER |
POSTGRES_DB | Default database created on first init; used by both Flowise and pgvector |
EMBEDDING_SIZE | Vector dimension for pgvector columns — must match the embedding model configured in Flowise |
Health check
Thepg_isready command checks that PostgreSQL is accepting connections on the default port for the configured user and database. Flowise waits for this check to pass before starting.
Volume
postgres_data. This includes both Flowise application tables and the pgvector embedding tables.
MySQL — FleetDM backend
MySQL 8 is the relational backend for FleetDM. It stores all host records, enrolled agents, osquery packs, scheduled queries, policy definitions, results, and vulnerability findings. Thelinux/x86_64 platform pin ensures compatibility with the FleetDM image’s expected architecture.
Full service definition
Environment variables
| Variable | Description |
|---|---|
MYSQL_ROOT_PASSWORD | Root account password; required by the MySQL image |
MYSQL_DATABASE | Database created on first init; referenced by FLEET_MYSQL_DATABASE |
MYSQL_USER | Application user created on first init |
MYSQL_PASSWORD | Password for MYSQL_USER; used by FleetDM to connect |
Health check
mysqladmin ping probes the MySQL server over TCP. Fleet waits for this check to succeed before running fleet prepare db.
cap_add: SYS_NICE allows MySQL to use real-time scheduling priorities, which reduces latency jitter on busy hosts. This is standard practice for MySQL containers.Volume
Redis — FleetDM cache and sessions
Redis 6 provides in-memory storage for FleetDM’s distributed session management, live query fan-out, and inter-process state. Append-only file (AOF) persistence is enabled so the cache survives container restarts without full data loss.Full service definition
Append-only persistence
The--appendonly yes flag passed to redis-server enables AOF persistence. Every write operation is logged to the AOF file in the redis:/data volume before the acknowledgment is sent to the client, ensuring data survives an unclean shutdown.
Health check
redis-cli ping sends a PING command to the Redis server and expects a PONG response. Fleet waits for this check before starting.
Volume
Summary
PostgreSQL
AI embeddings, Flowise metadata, and pgvector similarity search. Custom image with configurable
EMBEDDING_SIZE. Used by Flowise.MySQL
FleetDM application state: hosts, policies, queries, and vulnerability results. Standard
mysql:8 image on linux/x86_64. Used by FleetDM.Redis
In-memory cache for FleetDM sessions and live query coordination. AOF persistence enabled. Used by FleetDM.