deployment-orchestrator
Turn the generated full-stack system into a buildable and deployable runtime package.
SKILL.md 原文预览
Skill: deployment-orchestrator
Purpose
Generate deployment infrastructure that is:
- reproducible
- environment-configurable
- Docker-friendly
- safe for local/staging deployment
- aligned with the project's single-app frontend architecture
Deployment Architecture Assumption
This project uses:
- one Spring Boot backend
- one Vue frontend application
- one database service
- optional reverse proxy / nginx config
- environment-based runtime configuration
Important:
- frontend is a single app
- do NOT assume separate frontend apps for admin and storefront
Output Locations
Prefer generating deployment files under:
infra/docker/infra/nginx/infra/scripts/infra/db/
Keep root-level:
docker-compose.yml- optional
.env.example
Backend Deployment Rules
Backend Docker build should:
- use multi-stage build if practical
- build jar in builder stage
- run via lightweight JDK runtime image
- expose port
8080
Backend container must:
- load config via environment
- avoid embedding secrets
- connect to DB by service name, not localhost
Frontend Deployment Rules
Frontend Docker build should:
- build from the
frontend/project root - use Node build stage
- produce static assets
- serve assets with nginx
- expose port
80
Do not design separate frontend deployment units for admin/storefront unless explicitly requested.
Docker Compose Rules
Compose must include:
- backend service
- single frontend service
- database service
- appropriate networks
- volumes where necessary
Service communication rules:
- use Docker service names
- never use localhost between containers
Database Deployment Rules
Database should:
- stay internal where possible
- use volume-backed persistence for local/staging
- support schema init/import from SQL
- avoid public exposure unless explicitly requested
DB init assets should live under:
infra/db/
Environment Variable Rules
All sensitive or environment-dependent configuration must come from env variables.
Use:
.env.examplefor placeholders/documentation- runtime env injection for real values
Forbidden:
- secrets committed into generated deployment files
- hardcoded DB credentials
- hardcoded production URLs
Build Rules
Backend
Typical build:
mvn clean package -DskipTests
Frontend
Run from frontend root:
npm installnpm run build
Reverse Proxy Rules
If nginx config is needed:
- place under
infra/nginx/ - use it for static frontend serving or proxying as needed
- keep config simple and environment-friendly
Script Rules
Utility scripts may be placed under:
infra/scripts/
Typical scripts:
- build helper
- init helper
- deploy helper
Scripts should:
- be readable
- avoid dangerous assumptions
- avoid hidden secrets
CI/CD Guidance
If generating CI/CD:
- build backend
- build frontend
- optionally run tests/lint
- build images
- optionally push images
- keep deployment steps explicit
Forbidden Patterns
- assuming localhost between containers
- exposing DB publicly by default
- putting secrets in repo
- splitting frontend into multiple containers without requirement
- breaking the single-app frontend assumption
Final Goal
The deployment output must produce a system that is:
- buildable
- runnable
- containerized
- environment-configurable
- aligned with the project structure
评论
