Skip to main content

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.

The development environment is designed for engineers working on NextAudit AI itself. Ollama and PostgreSQL are built from local source directories instead of pulling pre-published images, so changes to the AI model configuration or database schema take effect immediately after a rebuild. All other services—Flowise, n8n, MySQL, Redis, and Fleet—use upstream images just as they do in production.
Fleet requires TLS certificates at src/ai-sentinel/certs/fleet.crt and src/ai-sentinel/certs/fleet.key. The container will not start without them. Generate a self-signed pair for local use with openssl req -x509 -newkey rsa:4096 -keyout fleet.key -out fleet.crt -days 365 -nodes.

Steps

1

Clone the repository

git clone https://github.com/Kevin2523/nextAuditAi.git
2

Enter the project directory

cd nextAuditAi
3

Copy environment variables

Copy the development example file and fill in the required values:
cp src/ai-sentinel/dev.env.example src/ai-sentinel/.env
The .env.example template files are distributed on the develop branch. If you are working from main, create src/ai-sentinel/.env manually using the Environment variables reference.
Open src/ai-sentinel/.env and set at minimum the variables listed in the key variables section below.
4

Create the certs directory and add Fleet TLS certificates

Fleet expects its certificate and key at paths mounted from src/ai-sentinel/certs/. Create the directory and place your certificate files there:
mkdir -p src/ai-sentinel/certs
# Copy or generate fleet.crt and fleet.key into this directory
For a self-signed certificate suitable for local development:
openssl req -x509 -newkey rsa:4096 \
  -keyout src/ai-sentinel/certs/fleet.key \
  -out src/ai-sentinel/certs/fleet.crt \
  -days 365 -nodes \
  -subj "/CN=localhost"
5

Start the stack

docker compose -f src/ai-sentinel/docker-compose.dev.yml up -d
Docker Compose will build the ollama and postgres images from their local contexts on first run. Subsequent starts reuse the cached layers unless you pass --build.
6

Verify all services are running

docker compose -f src/ai-sentinel/docker-compose.dev.yml ps
All services should show a running or healthy status. Fleet depends on MySQL, Redis, and fleet-init completing before it starts, so allow 30–60 seconds for the full stack to become ready.

Services and default ports

The port each service listens on is controlled by environment variables so you can remap them in .env without editing the Compose file.
ServiceContainer portHost port env varDefault internal port
Ollama11434OLLAMA_PORT11434
PostgreSQL5432POSTGRES_PORT5432
FlowiseFLOWISE_PORTFLOWISE_PORT
n8n5678N8N_PORT5678
MySQL3306(hardcoded 3306)3306
Redis6379(hardcoded 6379)6379
Fleet UI/APIFLEET_SERVER_PORTFLEET_SERVER_PORT

Key environment variables

These variables must be set before starting the stack. Refer to Environment variables reference for the full list.
VariableDescription
FLEET_SERVER_PRIVATE_KEYRandom 32-byte base64 secret. Generate with openssl rand -base64 32.
FLEET_SERVER_TLSSet to true to enable HTTPS on the Fleet API.
FLEET_SERVER_CERTPath inside the container to the Fleet TLS certificate (/fleet/fleet.crt).
FLEET_SERVER_KEYPath inside the container to the Fleet TLS key (/fleet/fleet.key).
MYSQL_ROOT_PASSWORDRoot password for the MySQL instance used by Fleet.
MYSQL_PASSWORD / FLEET_MYSQL_PASSWORDMatching passwords for the Fleet MySQL user.
POSTGRES_PASSWORDPassword for the PostgreSQL user shared by Flowise.
OLLAMA_MODELSComma-separated list of models to load on startup.
The FLEET_REDIS_ADDRESS and FLEET_MYSQL_ADDRESS values are hardcoded in the Compose file to redis:6379 and mysql:3306 respectively, using Docker’s internal DNS. You do not need to set these in .env.

Build docs developers (and LLMs) love