Local Docker deployment management for the MyBlog project. Use this skill when deploying, starting, stopping, or managing the local development environment with Docker Compose.
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.
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.
All deployment scripts are located in the deploy/local/ directory at the project root:
Quick Deploy - deploy/local/quick-deploy.sh
./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
--rebuild or -r flag is provided./deploy/local/start.sh [--rebuild]Deploy Update - deploy/local/deploy-update.sh
quick-deploy.sh --incremental)./deploy/local/deploy-update.sh (incremental)./deploy/local/deploy-update.sh --rebuild (full rebuild)Apply Migrations - deploy/local/apply-migrations.sh
myblog-backend/database/migrations/*.sql in sorted ordertb_schema_migrations./deploy/local/apply-migrations.shStop - deploy/local/stop.sh
./deploy/local/stop.shLogs - deploy/local/logs.sh
Cleanup - deploy/local/cleanup.sh
./deploy/local/cleanup.shAfter 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 | - |
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
Both frontend and backend support hot reload during development:
Scripts will detect and report if Docker is not running. Start Docker Desktop before deployment.
If ports are already in use, adjust port mappings in docker-compose.yml.
If backend service takes longer than expected:
./deploy/local/logs.sh (option 8 for real-time backend logs)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
This skill includes the following bundled resources:
scripts/deploy.sh
scripts/health-check.sh
references/architecture.md
references/commands.md