Complete management for Jokers Hockey website - deployment, build checks, database migrations (Drizzle ORM), and PM2 process management. Use for any Jokers site operation.
Manages complete infrastructure for Jokers Hockey website including deployment, database migrations, and PM2 processes.
/plugin marketplace add theflysurfer/claude-skills-marketplace/plugin install theflysurfer-claude-skills-marketplace@theflysurfer/claude-skills-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Complete infrastructure management for the Jokers Hockey website.
| Component | Details |
|---|---|
| Server | srv759970.hstgr.cloud (69.62.108.82) |
| User | automation |
| Path | /var/www/jokers |
| PM2 Process | jokers-hockey |
| Port | 5020 |
| URL | https://jokers.srv759970.hstgr.cloud |
| Database | PostgreSQL (localhost:5432/jokers_prod) |
| ORM | Drizzle |
ssh automation@69.62.108.82
cd /var/www/jokers
git pull origin main
npm install
npm run db:push
npm run build
pm2 restart jokers-hockey
# Local: verify build works
npm run check
npm run build
ls -la dist/
pm2 status jokers-hockey
pm2 logs jokers-hockey --lines 50
curl -I https://jokers.srv759970.hstgr.cloud
git log --oneline -5
git checkout <previous-commit>
npm install && npm run build
pm2 restart jokers-hockey
# TypeScript compilation
npm run check
# Clean build
rm -rf dist/ && npm run build
# Verify output
ls -la dist/
ls -la dist/public/assets/
dist/
├── index.js (server ~5KB)
└── public/
├── index.html
└── assets/
├── index-[hash].css (~70KB)
└── index-[hash].js (~350KB)
# No debug code
grep -r "console.log\|debugger" client/src/ || echo "Clean"
# Security audit
npm audit --production
# Bundle sizes (should be < 500KB JS, < 100KB CSS)
du -sh dist/public/assets/*.js
du -sh dist/public/assets/*.css
shared/schema.tsdrizzle.config.ts# Development (direct apply)
npm run db:push
# Production
ssh automation@69.62.108.82
cd /var/www/jokers
git pull origin main
npm run db:push
pm2 restart jokers-hockey
import { pgTable, serial, text, timestamp } from "drizzle-orm/pg-core";
export const news = pgTable("news", {
id: serial("id").primaryKey(),
title: text("title").notNull(),
content: text("content").notNull(),
publishedAt: timestamp("published_at").defaultNow(),
});
docker exec postgresql-shared pg_dump -U postgres jokers_prod > backup_$(date +%Y%m%d).sql
ssh automation@69.62.108.82
docker exec -it postgresql-shared psql -U postgres -d jokers_prod
\dt # list tables
\d table_name # describe table
\q
ssh automation@69.62.108.82
pm2 status jokers-hockey
pm2 show jokers-hockey
pm2 monit # live dashboard
pm2 logs jokers-hockey --lines 100
pm2 logs jokers-hockey --err # errors only
pm2 flush jokers-hockey # clear logs
pm2 restart jokers-hockey
pm2 stop jokers-hockey
pm2 start jokers-hockey
pm2 reload jokers-hockey # zero-downtime
File: /var/www/jokers/ecosystem.config.cjs
module.exports = {
apps: [{
name: 'jokers-hockey',
script: './dist/index.js',
instances: 1,
env: { NODE_ENV: 'production', PORT: 5020 },
max_memory_restart: '500M',
}]
}
pm2 save # after any changes
pm2 status jokers-hockey
pm2 logs jokers-hockey --lines 100
pm2 restart jokers-hockey
curl -I https://jokers.srv759970.hstgr.cloud
npm run check # TypeScript errors
rm -rf node_modules/.vite && npm install
npm run build
echo $DATABASE_URL
docker exec postgresql-shared psql -U postgres -d jokers_prod -c "SELECT version();"
netstat -tulpn | grep :5020
pm2 restart jokers-hockey
sudo nginx -t
sudo tail -f /var/log/nginx/jokers_ssl_error.log
#!/bin/bash
echo "=== Jokers Health Check ==="
pm2 status jokers-hockey | grep online && echo "PM2: OK"
curl -sI https://jokers.srv759970.hstgr.cloud | grep "200\|301" && echo "HTTP: OK"
netstat -tulpn | grep :5020 && echo "Port: OK"
docker exec postgresql-shared psql -U postgres -d jokers_prod -c "SELECT 1;" && echo "DB: OK"
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.