Skip to content

Docker Quickstart

Deploy Purple8 Graph as a REST API server in seconds using Docker.

Single command

bash
docker run -d \
  --name purple8-graph \
  -p 8010:8000 \
  -e JWT_SECRET=your-secret-key-minimum-32-characters \
  -e ADMIN_EMAIL=admin@yourcompany.com \
  -e ADMIN_PASSWORD=YourSecurePassword123 \
  -v purple8-data:/data \
  purple8/purple8-graph:latest

The API is live at http://localhost:8010. Interactive docs at http://localhost:8010/docs.

With Docker Compose

yaml
# docker-compose.yml
version: "3.9"
services:
  purple8-graph:
    image: purple8/purple8-graph:latest
    ports:
      - "8010:8000"
    environment:
      JWT_SECRET: "your-secret-key-minimum-32-characters"
      ADMIN_EMAIL: "admin@yourcompany.com"
      ADMIN_PASSWORD: "YourSecurePassword123"
      WORKERS: 2
    volumes:
      - purple8-data:/data
    restart: unless-stopped

volumes:
  purple8-data:
bash
docker compose up -d

Quick smoke test

bash
# 1. Get a token
TOKEN=$(curl -s -X POST http://localhost:8010/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"admin@yourcompany.com","password":"YourSecurePassword123"}' \
  | jq -r .access_token)

# 2. Add a node
curl -s -X POST http://localhost:8010/v1/nodes \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"id":"doc1","labels":["Document"],"properties":{"title":"Hello Purple8"}}'

# 3. Query it
curl -s -X POST http://localhost:8010/v1/cypher \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query":"MATCH (n:Document) RETURN n.title"}'

With encryption (KMS)

Add KMS_PROVIDER to enable at-rest encryption on all node and edge values:

yaml
environment:
  JWT_SECRET: "your-secret-key-minimum-32-characters"
  KMS_PROVIDER: "local"           # local | aws | gcp | azure | vault
  KMS_LOCAL_KEYSTORE: "/data/kms"

For cloud KMS providers, see the Encryption & KMS guide.

Environment variables

VariableRequiredDefaultDescription
JWT_SECRETYesJWT signing secret (min 32 chars)
ADMIN_EMAILNoadmin@purple8.aiAdmin user email
ADMIN_PASSWORDNoPurple8Admin!Admin user password
WORKERSNo2uvicorn worker count
DATA_DIRNo/dataData directory inside container
KMS_PROVIDERNo(disabled)local | vault | aws | gcp | azure
KMS_KEY_IDWhen KMS enabledMaster key ID

Full environment variable reference → /reference/env-vars

Purple8 Graph is proprietary software. All rights reserved.