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 historyApp 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 nameField Reference
| Field | Required | Description |
|---|---|---|
| name | Yes | Unique identifier for the app |
| repo | Yes | Git repository URL (SSH format recommended) |
| branch | No | Git branch to deploy (default: main) |
| path | No | Local path for code (default: /var/www/<name>) |
| type | No | App type: nextjs, node, static, script (default: nextjs) |
| port | No | Port to run on (auto-allocated if not specified) |
| domain | No | Domain name for Nginx proxy |
| ssl.email | No | Email for SSL cert (default: contact@domain) |
| build.command | No | Build command (default: npm ci && npm run build) |
| build.timeout | No | Build timeout in seconds (default: 600) |
| start.command | No | Start command (default: npm start) |
| env | No | Environment variables |
| resources.memory | No | PM2 memory limit (default: 512M) |
| resources.instances | No | PM2 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 startnode
Generic Node.js applications. Customize the start command as needed.
type: node
start:
command: node dist/server.jsstatic
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 directlyscript
Custom deployment using a shell script in your repo.
type: script
deploy:
script: deploy.sh # Script in your repo rootEngine 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:idlemystNote: 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