Configuration

Shyp uses YAML files for all configuration. Everything lives in /etc/shyp/.

Directory Structure

/etc/shyp/
├── config.yaml          # Global configuration
├── apps/                # App configurations
│   ├── my-app.yaml
│   ├── api-server.yaml
│   └── ...
├── engines/             # Engine configurations (multi-module apps)
│   └── wyrt.yaml
└── state/               # Runtime state (managed by Shyp)
    ├── ports.json       # Port allocations
    └── deployments.json # Deployment history

App Configuration

Each app has its own YAML file in /etc/shyp/apps/.

Complete Example

apps/my-app.yaml
name: my-app
description: My awesome application
repo: git@github.com:you/my-app.git
branch: main
path: /var/www/my-app
type: nextjs
port: 3001
domain: my-app.com

ssl:
  email: contact@my-app.com    # Override default contact@domain

build:
  command: npm ci && npm run build
  timeout: 600                  # Build timeout in seconds

start:
  command: npm start

env:
  NODE_ENV: production
  DATABASE_URL: postgres://...

resources:
  memory: 512M
  instances: 1

pm2:
  name: my-app                  # PM2 process name

Field Reference

FieldRequiredDescription
nameYesUnique identifier for the app
repoYesGit repository URL (SSH format recommended)
branchNoGit branch to deploy (default: main)
pathNoLocal path for code (default: /var/www/<name>)
typeNoApp type: nextjs, node, static, script (default: nextjs)
portNoPort to run on (auto-allocated if not specified)
domainNoDomain name for Nginx proxy
ssl.emailNoEmail for SSL cert (default: contact@domain)
build.commandNoBuild command (default: npm ci && npm run build)
build.timeoutNoBuild timeout in seconds (default: 600)
start.commandNoStart command (default: npm start)
envNoEnvironment variables
resources.memoryNoPM2 memory limit (default: 512M)
resources.instancesNoPM2 instances/cluster mode (default: 1)

App Types

nextjs

Next.js applications. Uses npm start which runs next in production mode.

type: nextjs
build:
  command: npm ci && npm run build
start:
  command: npm start

node

Generic Node.js applications. Customize the start command as needed.

type: node
start:
  command: node dist/server.js

static

Static files served directly by Nginx. No PM2 process needed.

type: static
build:
  command: npm ci && npm run build
# No start command - Nginx serves files directly

script

Custom deployment using a shell script in your repo.

type: script
deploy:
  script: deploy.sh   # Script in your repo root

Engine Configuration

Engines are for complex multi-module applications like game servers. They manage multiple ports and can have several deployable modules.

engines/wyrt.yaml
type: engine
name: wyrt

server:
  repo: git@github.com:you/wyrt-server.git
  path: /var/www/wyrt
  pm2:
    name: wyrt
    memory: 2G

  ports:
    http: 4040
    websocket: 8080
    webmanager_start: 3003

modules:
  fyrnvale:
    domain: fyrnvale.com
    port: 3003
    deploy:
      mode: script
      script: games/fyrnvale/deploy.sh

  idlemyst:
    domain: idlemyst.com
    port: 3004
    deploy:
      mode: pm2
      build: npm run build:idlemyst

Note: Deploy individual modules with shyp deploy wyrt --module fyrnvale

Global Configuration

Optional global settings in /etc/shyp/config.yaml.

config.yaml
# Default port range for auto-allocation
ports:
  start: 3000
  end: 4000

# Default SSL email (can be overridden per app)
ssl:
  email: admin@example.com

# Webhook server configuration
webhook:
  port: 9000