Files
michaelschiemer/deployment/docs/QUICKSTART.md
Michael Schiemer 9b74ade5b0 feat: Fix discovery system critical issues
Resolved multiple critical discovery system issues:

## Discovery System Fixes
- Fixed console commands not being discovered on first run
- Implemented fallback discovery for empty caches
- Added context-aware caching with separate cache keys
- Fixed object serialization preventing __PHP_Incomplete_Class

## Cache System Improvements
- Smart caching that only caches meaningful results
- Separate caches for different execution contexts (console, web, test)
- Proper array serialization/deserialization for cache compatibility
- Cache hit logging for debugging and monitoring

## Object Serialization Fixes
- Fixed DiscoveredAttribute serialization with proper string conversion
- Sanitized additional data to prevent object reference issues
- Added fallback for corrupted cache entries

## Performance & Reliability
- All 69 console commands properly discovered and cached
- 534 total discovery items successfully cached and restored
- No more __PHP_Incomplete_Class cache corruption
- Improved error handling and graceful fallbacks

## Testing & Quality
- Fixed code style issues across discovery components
- Enhanced logging for better debugging capabilities
- Improved cache validation and error recovery

Ready for production deployment with stable discovery system.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 12:04:17 +02:00

3.7 KiB

Quick Start Guide

Get your Custom PHP Framework deployed quickly with this step-by-step guide.

Project Information

Prerequisites

  • Linux/macOS/WSL environment
  • Internet connection
  • Sudo privileges (for dependency installation)

1. First-Time Setup

Run the setup script to install dependencies and configure the deployment environment:

cd deployment/
./setup.sh

This will:

  • Install Docker, Docker Compose, and Ansible
  • Create configuration files from templates
  • Generate SSH keys for deployment
  • Validate the environment

Non-Interactive Setup

For automated/CI environments:

./setup.sh --skip-prompts

2. Configure Your Environments

Edit the environment files created during setup:

# Development environment
nano applications/environments/.env.development

# Staging environment  
nano applications/environments/.env.staging

# Production environment
nano applications/environments/.env.production

Important: Replace all template values, especially:

  • Database passwords
  • SSL email addresses
  • API keys and secrets

3. Test Your Configuration

Validate your configuration without making changes:

# Using the deploy script
./deploy.sh staging --dry-run

# Using make commands
make deploy-dry ENV=staging
make validate-config ENV=staging

4. Deploy to Staging

Deploy to staging environment for testing:

# Using the deploy script
./deploy.sh staging

# Using make command
make deploy-staging

5. Deploy to Production

When ready for production:

# Test production deployment first
./deploy.sh production --dry-run

# Deploy to production (requires confirmation)
./deploy.sh production

# Or using make
make deploy-production

Quick Commands Reference

Main Deployment Commands

# Deploy full stack to staging
make deploy-staging

# Deploy full stack to production
make deploy-production

# Dry run for any environment
make deploy-dry ENV=production

# Deploy only infrastructure
make infrastructure ENV=staging

# Deploy only application
make application ENV=staging

Status and Health Checks

# Check deployment status
make status ENV=staging

# Run health checks
make health ENV=production

# View application logs
make logs ENV=staging

Configuration Management

# Show deployment info
make info

# Validate configuration
make validate-config ENV=production

# Edit configuration
make edit-config ENV=staging

Emergency Commands

# Emergency stop all services
make emergency-stop ENV=staging

# Emergency restart all services
make emergency-restart ENV=production

# Create backup
make backup ENV=production

Deployment Flow

  1. Validation: Prerequisites, configuration, and tests
  2. Infrastructure: Ansible deploys security, Docker, Nginx, SSL
  3. Application: Docker Compose deploys PHP app, database, assets
  4. Health Checks: Validates deployment success

Safety Features

  • Production deployments require double confirmation
  • Database backups are created automatically
  • Dry run mode for testing without changes
  • Health checks verify deployment success
  • Emergency stop/restart commands available

Next Steps

Support

For issues or questions:

  • Check the troubleshooting guide
  • Review deployment logs
  • Verify configuration files
  • Test with dry-run mode first

Happy deploying! 🚀