一键导入
dev-stack
Run the development infrastructure stack with Docker Compose. Use when starting, stopping, or managing the dev environment.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run the development infrastructure stack with Docker Compose. Use when starting, stopping, or managing the dev environment.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Compile dashboard and loyalty projects in dev mode with hot reload. Dashboard uses npm, loyalty uses Maven with Spring Boot DevTools.
Run integration tests for the Loyalty Points Program using the containerized test suite. All tests are defined in specs/testing.md.
Launch a complete production demo by rebuilding all images and starting the full stack. Use when preparing a fresh demonstration.
Code generation guidelines for this project. Use when writing code, functions, or classes. Enforces English naming, concise comments, and project conventions.
Git commit guidelines for this project. Use when creating commits, writing commit messages, or preparing changes for version control. Enforces conventional commit format and English language.
Documentation guidelines for this project. Use when writing or updating markdown documentation, README files, or specifications. Enforces English language, table alignment, and ASCII diagram formatting.
| name | dev-stack |
| description | Run the development infrastructure stack with Docker Compose. Use when starting, stopping, or managing the dev environment. |
| metadata | {"author":"Alexandre Roman","version":"2.2"} |
Docker Compose configuration for local development with compose-dev.yaml.
# Start all development services
docker compose -f compose-dev.yaml up -d
# Check status
docker compose -f compose-dev.yaml ps
# Stop all services
docker compose -f compose-dev.yaml down
Infrastructure Services:
| Service | Port | Description | Status |
|---|---|---|---|
| gateway | 8080 | Caddy reverse proxy (dashboard + API) | ✅ Complete |
| temporal | 7233, 8233 | Temporal server + Web UI | ✅ Complete |
| redis | 6379 | Redis (in-memory, no persistence) | ✅ Complete |
| toxiproxy | internal | Chaos engineering proxy | ✅ Complete |
| chaos-service | internal | Chaos control plane API | ✅ Complete |
| chaos-helper | internal | Error response provider for chaos | ✅ Complete |
Business Services:
| Service | Port | Description | Status |
|---|---|---|---|
| customer-service | internal | Customer CRUD (Go + Redis) | ✅ Complete |
| email-service | internal | Mock email notifications (Python) | ✅ Complete |
| redemption-service | internal | Mock redemption (TypeScript) | ✅ Complete |
| loyalty-service | host | Temporal workflows (Java/Spring) ** | ✅ Complete |
** Run manually with Maven in dev mode (see Development Workflow below)
Note: All business services are accessed through the gateway at port 8080.
All services are accessed through the gateway:
Note: Even if Dashboard or Loyalty Service run on the host for development, always use http://localhost:8080. The gateway proxies to host services automatically.
# Restart a single service
docker compose -f compose-dev.yaml restart gateway
# View logs
docker compose -f compose-dev.yaml logs -f customer-service
# Rebuild and restart a service
docker compose -f compose-dev.yaml up -d --build customer-service
# Stop a specific service
docker compose -f compose-dev.yaml stop email-service
# Check gateway health
curl http://localhost:8080/health
# Check all service health via Chaos API
curl http://localhost:8080/api/chaos/health
# Check specific services
curl http://localhost:8080/api/customers # Customer Service
curl http://localhost:8080/api/emails # Email Service
curl http://localhost:8080/api/redemptions # Redemption Service
# Kill a service to test recovery
curl http://localhost:8080/api/chaos/services/customer/kill
curl http://localhost:8080/api/chaos/services/email/kill
curl http://localhost:8080/api/chaos/services/redemption/kill
curl http://localhost:8080/api/chaos/services/loyalty/kill
# Docker Compose will automatically restart the service within 10-20s
For Dashboard development (with hot reload):
# 1. Start Docker services
docker compose -f compose-dev.yaml up -d
# 2. In separate terminal, start Dashboard dev server
cd dashboard
npm run dev
For Loyalty Service development:
# 1. Start Docker services
docker compose -f compose-dev.yaml up -d
# 2. In separate terminal, run Loyalty Service with Maven
cd loyalty
mvn spring-boot:run
Important: Even when Dashboard and Loyalty Service run on the host machine, always access the application via http://localhost:8080. The gateway automatically proxies requests to services running on the host (via host.docker.internal).
host.docker.internalunless-stopped)