Request a demo
Documentation

Deploy with Docker Compose

Everything you need to run InsightPrompts on a laptop, a VM, or on-prem — configuration, persistence, updates, and the full compose reference.

Architecture

The stack is four containers on a private Docker network:

• frontend — the web UI (nginx). The only service published to the host (port 8080). It proxies /api to the backend.

• backend — the API. Runs database migrations and creates the admin user on startup. Not exposed to the host.

• postgres — the database (Postgres 16, the prompts schema), persisted on a named volume. Not exposed to the host.

• seed — a one-shot job that creates the demo login and sample data, then exits.

Because only the UI port is published, the database and API are not reachable from outside the Docker network — clients interact only through the web UI (and its /api proxy).

Prerequisites

• Docker Desktop (macOS/Windows) or Docker Engine 24+ with the Compose v2 plugin (Linux).

• ~4 GB free disk.

• Host port 8080 free (configurable via UI_PORT).

• A registry login if the images are private (see Private registry).

1. Get the files

You only need two files in an empty folder — no source code:

• docker-compose.client.yml — the stack definition (full text in the reference below).

• .env — your configuration (copy from .env.example).

2. Configure (.env)

Create .env next to the compose file. The demo and admin passwords have no defaults: set your own (8+ characters), or the seed skips that user. Set INSIGHT_SECRET_KEY once and keep it: it seals stored connection credentials, and the API will not start without it outside local development.

VariableDefaultWhat it does
IMAGE_NAMESPACEverticalserveRegistry namespace the images come from
IMAGE_TAGlatestVersion to run (e.g. 1.1.0)
UI_PORT8080Host port for the web UI
PG_USER / PG_PASSWORD / PG_DBinsight / insightpass / companyThe bundled Postgres; change the password beyond local testing
INSIGHT_DATABASE_URLthe bundled PostgresPoint at your own Postgres instead (with INSIGHT_DATABASE_SECRET for the password)
INSIGHT_SECRET_KEY—Fernet key that seals connection credentials at rest; generate once and keep
DEMO_EMAIL / DEMO_PASSWORDdemo@verticalserve.com / noneSeeded standard-user login
ADMIN_EMAIL / ADMIN_PASSWORDadmin@verticalserve.com / noneSeeded administrator login
OKTA_ENABLED and OKTA_*falseSwitch from password login to Okta SSO; the UI reads it at runtime
CORS_ORIGINS—Browser origins allowed to call the API, comma-separated
AWS_REGION / AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY—Optional — enable live model calls (see below)

Example .env:

IMAGE_NAMESPACE=verticalserve
IMAGE_TAG=1.1.0
UI_PORT=8080
PG_PASSWORD=change-me
# python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
INSIGHT_SECRET_KEY=<your Fernet key>
DEMO_EMAIL=demo@verticalserve.com
DEMO_PASSWORD=<choose one>
ADMIN_EMAIL=admin@verticalserve.com
ADMIN_PASSWORD=<choose one>

3. Pull and run

# authenticate if the images are private
docker login

docker compose -f docker-compose.client.yml pull
docker compose -f docker-compose.client.yml up -d

First start takes a minute while the database initializes, migrations run, and the demo data is seeded. Check progress with:

docker compose -f docker-compose.client.yml ps
docker compose -f docker-compose.client.yml logs -f seed   # watch the seed finish

First login & what’s seeded

Open http://localhost:8080 and sign in with either seeded account, using the passwords you set in .env:

# standard user
email:    demo@verticalserve.com
password: your DEMO_PASSWORD

# administrator
email:    admin@verticalserve.com
password: your ADMIN_PASSWORD

The seed creates two ready-to-run examples under Insights:

• Coverage Gap Analysis — uses inline context (works fully offline).

• Loss by Peril — runs live SQL against a seeded sample table, parameterized by the policy number you enter.

Building, testing (resolve/preview), evaluation and certification all work out of the box. Generating a final model answer requires model credentials — see Models & connectors.

Data persistence & backup

Postgres stores data on the pg_data named volume, so your work persists across restart, stop/start, and up/down (without -v).

# stop (keeps data)
docker compose -f docker-compose.client.yml down

# back up the database to a file
docker compose -f docker-compose.client.yml exec postgres \
  sh -c 'exec pg_dump -U "$POSTGRES_USER" "$POSTGRES_DB"' > backup.sql

# wipe everything INCLUDING data
docker compose -f docker-compose.client.yml down -v

Updating to a new version

Set the new IMAGE_TAG in .env (or use latest), then pull and recreate. Database migrations run automatically on the backend’s next start; your data is preserved.

docker compose -f docker-compose.client.yml pull
docker compose -f docker-compose.client.yml up -d

Enabling live model calls & connectors

The platform resolves context (documents, SQL, dashboards) and fills prompts out of the box. To generate the final AI answer, provide model credentials in .env:

AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your-key
AWS_SECRET_ACCESS_KEY=your-secret

Cloud connectors (SharePoint, warehouses, Power BI, …) are configured in-app under Data Locations with your own credentials. Nothing leaves your environment.

Private registry access

For commercial deployments the images are private. Authenticate with the credentials we provide before pulling:

# with a read-only access token we issue you
docker login -u <namespace> -p <access-token>

For air-gapped sites we provide an offline image bundle instead:

docker load -i insightprompts-images.tgz
docker compose -f docker-compose.client.yml up -d

Common commands

docker compose -f docker-compose.client.yml ps            # status
docker compose -f docker-compose.client.yml logs -f backend
docker compose -f docker-compose.client.yml restart backend
docker compose -f docker-compose.client.yml run --rm seed  # re-seed demo data (idempotent)
docker compose -f docker-compose.client.yml down           # stop, keep data

Troubleshooting

• Port 8080 in use — set a different UI_PORT in .env and re-run up -d.

• UI loads but API calls fail — the backend is still starting; logs -f backend until you see “Application startup complete”.

• Seed didn’t run — run it manually: docker compose -f docker-compose.client.yml run --rm seed.

• pull denied — you need docker login with access to the private images.

docker-compose.client.yml (reference)

Copy this into docker-compose.client.yml:

name: insightprompts

x-database-env: &database-env
  INSIGHT_DATABASE_URL: ${INSIGHT_DATABASE_URL:-postgresql://${PG_USER:-insight}:${PG_PASSWORD:-insightpass}@postgres:5432/${PG_DB:-company}}
  INSIGHT_DATABASE_SECRET: ${INSIGHT_DATABASE_SECRET:-}
  INSIGHT_DATABASE_SCHEMA: ${INSIGHT_DATABASE_SCHEMA:-prompts}
  # seals stored credentials; required (the API refuses to start without it) — keep it in .env, never change it
  INSIGHT_SECRET_KEY: ${INSIGHT_SECRET_KEY:-}
  INSIGHT_FIELD_KEY: ${INSIGHT_FIELD_KEY:-}             # the former key, read for values sealed before INSIGHT_SECRET_KEY
  INSIGHT_DATABASE_SSLMODE: ${INSIGHT_DATABASE_SSLMODE:-disable}

services:
  postgres:
    image: postgres:16
    restart: unless-stopped
    environment:
      POSTGRES_USER: ${PG_USER:-insight}
      POSTGRES_PASSWORD: ${PG_PASSWORD:-insightpass}
      POSTGRES_DB: ${PG_DB:-company}
    volumes:
      - pg_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${PG_USER:-insight} -d ${PG_DB:-company}"]
      interval: 5s
      timeout: 5s
      retries: 12
      start_period: 10s

  backend:
    image: ${IMAGE_NAMESPACE:-verticalserve}/insightprompts-api:${IMAGE_TAG:-latest}
    platform: linux/amd64
    restart: unless-stopped
    environment:
      <<: *database-env
      ADMIN_EMAIL: ${ADMIN_EMAIL:-admin@verticalserve.com}
      ADMIN_PASSWORD: ${ADMIN_PASSWORD:-}
      # Auth — Okta SSO is OFF by default (username/password login). Set OKTA_ENABLED=true and the
      # tenant values in .env to switch to SSO; the UI reads them at runtime (no image rebuild).
      OKTA_ENABLED: ${OKTA_ENABLED:-false}
      OKTA_ISSUER: ${OKTA_ISSUER:-}
      OKTA_CLIENT_ID: ${OKTA_CLIENT_ID:-}
      JWKS_URI: ${JWKS_URI:-}
      OKTA_REDIRECT_URI: ${OKTA_REDIRECT_URI:-}
      OKTA_SCOPE: ${OKTA_SCOPE:-openid profile email}
      CORS_ORIGINS: ${CORS_ORIGINS:-}
      AWS_REGION: ${AWS_REGION:-us-east-1}
      AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-}
      AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-}
    depends_on:
      postgres:
        condition: service_healthy

  seed:
    image: ${IMAGE_NAMESPACE:-verticalserve}/insightprompts-api:${IMAGE_TAG:-latest}
    platform: linux/amd64
    command: ["python", "-m", "app.commands.seed_demo"]
    environment:
      <<: *database-env
      DEMO_EMAIL: ${DEMO_EMAIL:-demo@verticalserve.com}
      DEMO_PASSWORD: ${DEMO_PASSWORD:-}
      ADMIN_EMAIL: ${ADMIN_EMAIL:-admin@verticalserve.com}
      ADMIN_PASSWORD: ${ADMIN_PASSWORD:-}
    depends_on:
      backend:
        condition: service_healthy
    restart: "no"

  frontend:
    image: ${IMAGE_NAMESPACE:-verticalserve}/insightprompts-ui:${IMAGE_TAG:-latest}
    platform: linux/amd64
    restart: unless-stopped
    ports:
      - "${UI_PORT:-8080}:80"
    depends_on:
      backend:
        condition: service_healthy

volumes:
  pg_data:

Want help deploying in your environment?

On-prem, air-gapped, Kubernetes, SSO — we’ll get InsightPrompts running the way your security team needs.

Talk to us