Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

DPE Operations Guide

Operations documentation for the DPE infrastructure team.

Docker Image

  • Base: gcr.io/distroless/static-debian12:nonroot
  • User: uid 65534 (nonroot, built-in to distroless)
  • Shell: None (distroless — no SSH possible)
  • Binary: Static musl-linked dpe (CLI with subcommands)

CLI Commands

The dpe binary provides three subcommands:

CommandDescription
dpe serveStart the web server
dpe validate <data_dir>Validate all data files under the given directory
dpe healthcheck [--url URL]Check if the server is healthy (default: http://localhost:8080/healthz)

dpe validate

Validates JSON data files for structural correctness and cross-reference integrity.

dpe validate ./data

What it checks:

  • JSON schema validity for all data file types (projects, persons, organizations, records, clusters, collections)
  • Cross-references between projects, persons, and organizations
  • Orphaned files that are not referenced by any parent entity

Exit codes:

  • 0 — all data files are valid
  • 1 — validation errors found (details printed to stderr)

dpe healthcheck

Lightweight probe for Docker HEALTHCHECK or monitoring:

dpe healthcheck                                    # default: http://localhost:8080/healthz
dpe healthcheck --url http://localhost:9090/healthz # custom URL

Ports

PortProtocolPurpose
8080HTTPApplication server

Environment Variables

VariableRequiredDefaultDescription
RUST_LOGNoinfoLog level filter (e.g., dpe_server=info,tower_http=debug)
DPE_DATA_DIRNomodules/dpe/server/dataPath to project/record JSON data files. Legacy alias: DATA_DIR (checked if DPE_DATA_DIR is unset)
DPE_FATHOM_SITE_IDNo(none)Fathom Analytics site ID (not a secret)
LEPTOS_SITE_ADDRNo0.0.0.0:8080Listen address and port
LEPTOS_SITE_ROOTNositePath to static site assets
LEPTOS_SITE_PKG_DIRNopkgJS/CSS package subdirectory
LEPTOS_OUTPUT_NAMENodpeCSS/JS output filename prefix
LEPTOS_ENVNoPRODLeptos environment (DEV or PROD)

Health Check

  • Endpoint: GET /healthz
  • Response: 200 OK (no body)
  • Purpose: Lightweight probe for Traefik/load balancers. Does not hit Leptos SSR.

Data Volume

  • Mount point: Value of DPE_DATA_DIR
  • Access: Read-only
  • Contents: Project metadata JSON files, organized by type (projects/, persons/, organizations/, clusters/, collections/, records/)

Resource Requirements

The DPE is lightweight — it serves static data with no database.

  • Memory: ~50-100 MB typical
  • CPU: Minimal (SSR rendering is fast, data is cached in-memory)
  • Disk: Data files + static assets (~50 MB)

Logging

Structured logging via tracing-subscriber. Configure levels with RUST_LOG:

# Default (info level)
RUST_LOG=info

# Debug HTTP requests
RUST_LOG=dpe_server=info,tower_http=debug

# Verbose debugging
RUST_LOG=debug

Observability

Fathom Analytics

Privacy-friendly, GDPR-compliant analytics. No cookies, no personal data collected.

Configuration: Set the DPE_FATHOM_SITE_ID environment variable to your Fathom site ID (not a secret). The tracking script is automatically injected into the HTML shell.

What gets tracked:

  • Page views
  • Tab switches (detected automatically via history.replaceState)

Disable: Omit the DPE_FATHOM_SITE_ID environment variable — no tracking script is rendered.