Skip to content

Infrastructure Documentation

Deploy protoLabs. Docker, systemd, staging — pick what fits your stack.

DocumentDescription
DockerDockerfile architecture, multi-stage builds, base images
Docker ComposeCompose variants, environment variables, volumes
DeploymentProduction deployment options (systemd, Docker)
CI/CDGitHub Actions workflows explained
MonitoringHealth checks, logging, observability
Backup & RecoveryVolume backups, restore procedures
systemdsystemd service configuration
NetworkingPorts, nginx, CORS, WebSocket proxying
SecretsInfisical deployment, MCP secret injection, team setup
SecurityContainer security, credentials management
TroubleshootingCommon issues and solutions
StagingStaging server setup, high-concurrency agent config
ArchitectureSystem architecture diagrams
Multi-Instance DeploymentTailscale mesh setup, trust model, drain procedure, runbook
Landing PageCloudflare Pages config for protolabs.studio

Infrastructure Overview

protoLabs uses a containerized architecture with three services:

┌─────────────────────────────────────────────────────────┐
│                    Host Machine                          │
├─────────────────────────────────────────────────────────┤
│  ┌─────────────┐    ┌─────────────────────────────────┐ │
│  │   Browser   │    │        Docker Containers         │ │
│  │             │    │  ┌───────────┐  ┌────────────┐  │ │
│  │  localhost  │────│─▶│    UI     │  │   Server   │  │ │
│  │    :3007    │    │  │  (nginx)  │──│  (Node.js) │  │ │
│  └─────────────┘    │  │   :80     │  │   :3008    │  │ │
│                     │  └───────────┘  └────────────┘  │ │
│                     │        │              │         │ │
│                     │        └──────────────┘         │ │
│                     │           WebSocket             │ │
│                     └─────────────────────────────────┘ │
│                                   │                     │
│                     ┌─────────────┴─────────────┐       │
│                     │      Docker Volumes       │       │
│                     │  - automaker-data         │       │
│                     │  - automaker-claude-config│       │
│                     │  - automaker-cursor-config│       │
│                     └───────────────────────────┘       │
└─────────────────────────────────────────────────────────┘

Deployment Options

1. Development (Local)

bash
npm run dev           # Interactive launcher
npm run dev:web       # Web browser mode
npm run dev:electron  # Desktop app mode

2. Development (Docker)

bash
docker compose -f docker-compose.dev.yml up

3. Production (Docker)

bash
docker compose up -d

4. Production (systemd)

bash
sudo systemctl enable protomaker
sudo systemctl start protomaker

Key Files

Docker

FilePurpose
DockerfileMulti-stage production build (server + UI targets)
Dockerfile.devDevelopment build with live reload support
docker-entrypoint.shPermission and credential setup on container start

Docker Compose

FilePurpose
docker-compose.ymlProduction (isolated, named volumes only)
docker-compose.dev.ymlDevelopment (source mounted, live reload)
docker-compose.staging.ymlStaging app services (server + UI)
docker-compose.docs.ymlDocs site (independent lifecycle from app)
docker-compose.override.ymlLocal customization (gitignored)

CI/CD Workflows

FilePurpose
.github/workflows/test.ymlUnit tests (Vitest)
.github/workflows/e2e-tests.ymlE2E tests (Playwright)
.github/workflows/pr-check.ymlBuild verification
.github/workflows/format-check.ymlPrettier formatting
.github/workflows/security-audit.ymlnpm audit
.github/workflows/auto-release.ymlVersion bump + tag + GitHub Release (staging→main)
.github/workflows/build-electron.ymlMulti-platform Electron builds (v* tag)
.github/workflows/deploy-staging.ymlAuto-deploy to staging on push to staging

Scripts

FilePurpose
scripts/setup-staging.shOne-command staging setup (build, start, drain)
scripts/smoke-test.shPost-deploy smoke tests (API, UI, docs, WS)
scripts/get-claude-token.shExtract Claude OAuth from macOS Keychain
scripts/get-cursor-token.shExtract Cursor OAuth from macOS Keychain

Service

FilePurpose
protomaker.servicesystemd unit file
apps/ui/nginx.confReverse proxy configuration

Ports

PortServiceDescription
3007UIWeb interface (nginx in Docker, Vite in dev)
3008ServerBackend API + WebSocket
3009DocsVitePress documentation site (nginx)

Environment Variables

See deployment.md for a complete list of environment variables.

Using the /devops Skill

protoLabs includes a /devops skill for managing infrastructure from Claude Code:

/devops           # Show container status
/devops health    # Run health diagnostics
/devops logs      # Analyze container logs
/devops backup    # Backup volumes
/devops restart   # Restart containers
/devops info      # Show configuration info

Built by protoLabs — Open source on GitHub