Nodevisor Docs
Services

Services

Pre-built Docker services for production deployments.

Overview

Nodevisor ships with pre-built Docker services that handle common infrastructure needs — reverse proxies, databases, caches, and web applications. Each service is a TypeScript class with sensible defaults, built-in health checks, and automatic Docker Compose/Swarm configuration.

All services extend the DockerService base class and can be added to a DockerCluster via addDependency().

import { DockerCluster, Traefik, Postgres, Redis, NodeWeb } from '@nodevisor/docker';

const cluster = new DockerCluster({ name: 'production', ... });

cluster.addDependency(new Traefik({ ssl: { email: 'ops@example.com' } }));
cluster.addDependency(new Postgres({ password: process.env.DB_PASSWORD! }));
cluster.addDependency(new Redis({ password: process.env.REDIS_PASSWORD! }));
cluster.addDependency(new NodeWeb({ name: 'api', domains: ['api.example.com'], appDir: './apps/api' }));

Available Services

ServiceDescriptionDefault ImageDefault Port
TraefikReverse proxy with automatic SSLtraefik:3.1.780, 443, 8080
PostgresPostgreSQL databasepostgres:17.55432
RedisRedis cache and data storeredis:8.0.26379
NodeWebNode.js web applicationsBuilt from source3000
Next.jsNext.js applicationsBuilt from source3000
WhoamiTest/debug service for verifying routingtraefik/whoami80

Class Hierarchy

Services are organized into a class hierarchy based on their role:

DockerService
├── WebProxy (abstract)
│   └── Traefik         — reverse proxy
├── PortDockerService
│   ├── Postgres        — database
│   └── Redis           — cache
└── Web
    ├── NodeWeb         — Node.js apps
    ├── Nextjs          — Next.js apps
    └── Whoami          — test service
  • DockerService — Base class providing volumes, networks, health checks, labels, and Docker Compose generation.
  • WebProxy — Abstract base for reverse proxies. Runs in global mode on manager nodes.
  • PortDockerService — Base for services that expose a single port (databases, caches).
  • Web — Base for web applications. Requires domains and a proxy (e.g., Traefik) for automatic routing.

On this page