smithery/slxr925

myblog-deploy-local

Local Docker deployment management for the MyBlog project. Use this skill when deploying, starting, stopping, or managing the local development environment with Docker Compose.

Installation

$ npx skills add smithery/slxr925 --skill myblog-deploy-local
More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 6,286 B
  • docs SUMMARY.md 203 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

MyBlog Local Deploy

Overview

This skill manages the local Docker development environment for the MyBlog project. It provides convenient access to deployment scripts located in deploy/local/ for starting, stopping, monitoring, and maintaining the complete development stack.

Quick Reference

Use the convenience wrapper script scripts/deploy.sh for common operations:

./scripts/deploy.sh start [--rebuild]   # Start environment
./scripts/deploy.sh deploy [--rebuild]  # Deploy update (default incremental)
./scripts/deploy.sh stop                # Stop all services
./scripts/deploy.sh restart             # Restart services
./scripts/deploy.sh logs [service]      # View logs (backend/frontend/mysql/redis/kafka/es/all)
./scripts/deploy.sh status              # Show container status and URLs
./scripts/deploy.sh clean               # Clean temporary files
./scripts/deploy.sh rebuild             # Rebuild and restart

For health checks, use scripts/health-check.sh to verify all services are running properly.

Deployment Scripts

All deployment scripts are located in the deploy/local/ directory at the project root:

Quick Start

Quick Deploy - deploy/local/quick-deploy.sh

  • Fastest way to get the development environment running
  • Supports full and incremental deployment modes
  • Runs database migrations automatically before backend health check
  • Performs health checks on MySQL, Redis, Kafka, and backend service
  • Does not create deployment backups (local uses Docker volumes only)
  • Usage:

- ./deploy/local/quick-deploy.sh (full deploy) - ./deploy/local/quick-deploy.sh --incremental (app-only incremental deploy) - ./deploy/local/quick-deploy.sh --rebuild (full rebuild without cache)

Start - deploy/local/start.sh

  • Starts the local Docker environment
  • Rebuilds images if --rebuild or -r flag is provided
  • Includes comprehensive health checks
  • Usage: ./deploy/local/start.sh [--rebuild]

Full Deployment

Deploy Update - deploy/local/deploy-update.sh

  • Complete deployment workflow: builds images then deploys
  • Default behavior is incremental deploy (quick-deploy.sh --incremental)
  • Usage:

- ./deploy/local/deploy-update.sh (incremental) - ./deploy/local/deploy-update.sh --rebuild (full rebuild)

Apply Migrations - deploy/local/apply-migrations.sh

  • Applies SQL files in myblog-backend/database/migrations/*.sql in sorted order
  • Tracks executed migrations in tbschemamigrations
  • Skips already applied migrations and fails on checksum drift
  • Usage: ./deploy/local/apply-migrations.sh

Management Operations

Stop - deploy/local/stop.sh

  • Stops all running containers
  • Optionally removes Docker volumes (prompts for confirmation)
  • Usage: ./deploy/local/stop.sh

Logs - deploy/local/logs.sh

  • Interactive log viewer for all services
  • Options:

1. Backend logs 2. Frontend logs 3. MySQL logs 4. Redis logs 5. Kafka logs 6. Elasticsearch logs 7. All service logs 8. Follow backend logs (real-time) 9. Follow all logs (real-time)

Cleanup - deploy/local/cleanup.sh

  • Removes temporary files, logs, and build artifacts
  • Cleans up: .log, .rdb, .aof, .bak, *.tmp, .DS_Store, etc.
  • Safe to run - excludes node_modules and target directories
  • Usage: ./deploy/local/cleanup.sh

Service Access URLs

After deployment, services are accessible at:

Service URL Credentials
Frontend (Dev) http://localhost:3000 -
Backend API http://localhost:8081 -
API Docs http://localhost:8081/doc.html -
Kafka UI http://localhost:8088 -
Elasticsearch http://localhost:9200 -
MySQL localhost:3307 root/xr123321
Redis localhost:6380 -

Docker Commands

The deployment scripts use Docker Compose with the docker-compose.yml file at the project root.

Common manual operations:

# View container status
docker compose ps

# View all logs
docker compose logs

# Restart a specific service
docker compose restart backend

# Execute command in container
docker exec -it myblog-backend bash

# Stop all services
docker compose down

# Stop and remove volumes
docker compose down -v

Hot Reload

Both frontend and backend support hot reload during development:

  • Backend: Code changes trigger automatic reload via Spring Boot DevTools
  • Frontend: Vite provides instant hot module replacement (HMR)

Troubleshooting

Docker not running

Scripts will detect and report if Docker is not running. Start Docker Desktop before deployment.

Port conflicts

If ports are already in use, adjust port mappings in docker-compose.yml.

Service health check timeout

If backend service takes longer than expected:

  • Check logs: ./deploy/local/logs.sh (option 8 for real-time backend logs)
  • Verify database connectivity
  • Check for Java heap issues in backend container

Clean restart

To start completely fresh:

./deploy/local/stop.sh    # Stop services
./deploy/local/cleanup.sh # Clean temp files
./deploy/local/quick-deploy.sh --rebuild  # Rebuild and deploy

Resources

This skill includes the following bundled resources:

Scripts

scripts/deploy.sh

  • Convenience wrapper for common deployment operations
  • Unified interface for start, deploy, stop, restart, logs, status, clean, rebuild commands
  • Simplifies service-specific log viewing

scripts/health-check.sh

  • Automated health verification for all services
  • Checks Docker, containers, MySQL, Redis, Kafka, Elasticsearch, Backend, and Frontend
  • Provides summary of healthy/unhealthy services

References

references/architecture.md

  • Detailed system architecture documentation
  • Service stack overview with ports and technologies
  • Docker Compose structure and service dependencies
  • Data persistence and troubleshooting guide

references/commands.md

  • Docker Compose quick reference
  • Service-specific commands for MySQL, Redis, Elasticsearch
  • Troubleshooting and diagnostic commands