@deeep-network/riptide
v3.0.0
Published
Universal Riptide Runtime for the DeEEP Network
Readme
@deeep-network/riptide
Self-contained container orchestration library with lifecycle hooks for Coral Reef services.
Prerequisites
Quick Start
Create a New Service
npx @deeep-network/riptide init my-service
cd my-serviceThis creates a new my-service directory with all the necessary files:
package.json- Dependencies and build scriptssrc/hooks.ts- Service lifecycle hooksDockerfile- Multi-stage container buildriptide.config.json- Service configurationtsconfig.jsonandtsup.config.ts- TypeScript configuration
Template Options
# Create with API key validation
npx @deeep-network/riptide init my-api --template with-secrets
# Create with subprocess management
npx @deeep-network/riptide init my-worker --template with-process
# Create with Prometheus metrics
npx @deeep-network/riptide init my-monitored --template with-metricsBuild and Run
# Install dependencies
pnpm install
# Build the service
pnpm run build
# Build Docker image
pnpm run build:docker
# Run the service
docker run -e MY_SECRETS=your-secrets reef-my-serviceTemplates
- basic - Simple healthy service with minimal hooks
- with-secrets - Includes API key validation and error handling
- with-process - Manages subprocess lifecycle
- with-metrics - Includes Prometheus metrics endpoint
Architecture
Riptide uses a secure 3-layer Docker architecture:
- Builder Layer - Compiles TypeScript and installs dependencies
- Third-party Base - Your service-specific dependencies and setup
- Riptide Runtime - Secure container runtime injected from
quay.io/nerdnode/riptide:latest
Services run as the riptide user (UID 1005) in the /riptide directory with controlled system access.
CLI Commands
# Initialize a new service (creates a new directory)
npx @deeep-network/riptide init <name> [--template TYPE]
# Start a service
npx @deeep-network/riptide start [--config PATH] [--hooks PATH]
# Validate configuration and hooks
npx @deeep-network/riptide validate [--config PATH] [--hooks PATH]
# Check service health
npx @deeep-network/riptide health
# Show service status
npx @deeep-network/riptide statusDevelopment
# For local development
git clone <your-service-repo>
cd <your-service>
pnpm install
pnpm run build
pnpm run validate
# For Docker development
pnpm run build:docker
docker run --rm -it reef-<service-name>License
MIT
