deployment-and-ops
БесплатноБез исполняемых скриптовНе проверенDeploy and operate the vehicle insurance data analysis platform. Use when user asks about local development setup, production deployment, server…
от FDU-INS★ 84 звезды на GitHubОб этом скилле
Deployment and Operations Guide
You are assisting with deploying and operating the vehicle insurance data analysis platform. This project uses a simple deployment model suitable for internal teams and small-scale production.
When to Use This Skill
Activate this skill when the user needs help with:
- Setting up local development environment
- Running the application (
start_server.sh) - Building frontend for production
- Deploying to a server
- Managing services (starting/stopping)
- Troubleshooting deployment issues
- Viewing logs and monitoring
Project Deployment Model
Current Approach: Simple, single-server deployment
- NOT using: Docker, Kubernetes, complex CI/CD
- NOT using: Gunicorn/uWSGI in production yet
- Currently using: Direct Python execution via
start_server.sh
This is appropriate for:
- Internal business tools
- Team size: < 50 users
- Data refreshed daily (not real-time)
Quick Start (Local Development)
Prerequisites Check
Guide the user to verify:
# Check Python (3.11+ required)
python3 --version
# Check Node.js (18+ recommended)
node -v
# Check if in correct directory
pwd # Should show /path/to/签单日报dayreport
Option 1: One-Command Start (Recommended)
# Start backend with the provided script
./start_server.sh
# Output:
# ========================================
# 每日签单平台趋势分析系统
# ========================================
# [1/3] 检查Python环境...
# [2/3] 检查依赖包...
# [3/3] 启动API服务器...
# 服务器地址: http://localhost:5000
What this script does:
- Checks Python environment (python3 or python)
- Auto-installs dependencies if missing (Flask, Pandas, etc.)
- Starts Flask backend on port 5000
- Serves static HTML from
/static/index.html
Option 2: Manual Start (for development)
# Terminal 1: Start backend
cd backend
python3 api_server.py
# Terminal 2: Start frontend dev server (if doing frontend dev)
cd frontend
npm install # First time only
npm run dev # Starts Vite on http://localhost:5173
Environment Setup Details
Python Environment
Install dependencies:
# From project root
pip3 install -r requirements.txt
# Requirements (from requirements.txt):
# - flask==3.0.0
# - flask-cors==4.0.0
# - numpy>=2.2,<3
# - pandas>=2.2.3,<3
# - openpyxl==3.1.2
Optional: Use virtual environment:
# Create venv (recommended for clean dependency management)
python3 -m venv .venv
# Activate
source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windows
# Install deps
pip install -r requirements.txt
Node.js Environment (Frontend Development Only)
Only needed if user wants to modify Vue components:
cd frontend
# Install dependencies
npm install
# Available commands
npm run dev # Start dev server (http://localhost:5173)
npm run build # Build for production (outputs to dist/)
npm run preview # Preview production build
npm run lint # Run ESLint
Production Build
Step 1: Build Frontend
cd frontend
# Production build
npm run build
# Output:
# vite v5.0.10 building for production...
# ✓ 104 modules transformed.
# dist/index.html 0.48 kB
# dist/assets/index-xxx.js 80.68 kB │ gzip: 31.98 kB
# dist/assets/index-xxx.css 14.05 kB │ gzip: 2.86 kB
Build artifacts: frontend/dist/
index.html- Entry pointassets/- Bundled JS/CSS with content hashes
Step 2: Deploy to Server
Simple deployment (current method):
# 1. Copy entire project to server
scp -r /path/to/签单日报dayreport user@server:/opt/dayreport/
# 2. SSH to server
ssh user@server
# 3. Install Python deps
cd /opt/dayreport
pip3 install -r requirements.txt
# 4. Start service
./start_server.sh
# Or run in background
nohup ./start_server.sh > app.log 2>&1 &
Step 3: Access Application
# If using start_server.sh (default):
http://server-ip:5000/static/index.html
# If using frontend dev server:
http://server-ip:5173
Service Management
Check if Services Running
# Check backend (port 5000)
lsof -i :5000
# Or
ps aux | grep api_server
# Check frontend dev server (port 5173)
lsof -i :5173
Start/Stop Services
# Stop backend
pkill -f api_server
# Stop frontend dev server
# (Ctrl+C in terminal, or)
pkill -f vite
# Restart backend
cd backend && python3 api_server.py &
# Restart frontend
cd frontend && npm run dev &
Background Execution
# Run backend in background
nohup python3 backend/api_server.py > backend.log 2>&1 &
# Get process ID
echo $! # Save this PID
# Stop later
kill <PID>
Log Management
Backend Logs
Location: backend/backend.log
# View real-time logs
tail -f backend/backend.log
# View last 50 lines
tail -n 50 backend/backend.log
# Search for errors
grep -i "error" backend/backend.log
# View logs with timestamps
tail -f backend/backend.log | while read line; do echo "$(date): $line"; done
Установить deployment-and-ops в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadBashGrepGlobFAQ
Что делает скилл deployment-and-ops?
Deploy and operate the vehicle insurance data analysis platform. Use when user asks about local development setup, production deployment, server configuration, build process, service management, or troubleshooting deployment issues. Focuses on the project's actual simple deployment model using start_server.sh, not complex enterprise setups.
Как установить скилл deployment-and-ops?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл deployment-and-ops запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic