Mockzilla logo

Configuration

Mockzilla is highly configurable via environment variables. This guide covers the most common settings for development and production.

Environment Variables

Core Settings

VariableDescriptionDefault
PORTThe port Mockzilla runs on inside Docker.36666
NODE_ENVEnvironment mode (development or production).development
DEPLOY_MODEControls available features. full enables the complete dashboard. landing serves only the marketing page.full
NEXT_PUBLIC_APP_URLThe base URL where Mockzilla is hosted.http://localhost:36666
NEXT_TELEMETRY_DISABLEDDisables anonymous data collection by Next.js.1

Database

Mockzilla uses PostgreSQL with Drizzle ORM.

VariableDescription
DATABASE_URLFull PostgreSQL connection string.
POSTGRES_USERDatabase user (development only).
POSTGRES_PASSWORDDatabase password (development only).
POSTGRES_DBDatabase name (development only).

Data Generation

Control how JSON Schema Faker behaves.

VariableDescriptionDefault
MOCKZILLA_MAX_ITEMSMaximum number of items in generated arrays.1000

Next.js Specifics

VariableDescriptionDefault
NEXT_DISABLE_ESLINTSkips ESLint checks during the build process to speed up iteration.true

Docker Configuration

Mockzilla is designed to be run with Docker Compose.

# docker-compose.yaml snippet
services:
  app:
    environment:
      - DATABASE_URL=postgres://mockzilla:password@postgres:5432/mockzilla
      - NEXT_PUBLIC_APP_URL=http://localhost:36666
    ports:
      - "36666:36666"

Advanced Settings

CORS Configuration

Mockzilla handles CORS automatically in middleware.ts, allowing all origins in development and restricted origins in production based on NEXT_PUBLIC_APP_URL.

MCP (Model Context Protocol)

To use Mockzilla with AI agents via MCP, ensure the MCP endpoint is accessible at /api/mcp. No additional configuration is required beyond standard environment setup.