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>
310 lines
7.9 KiB
YAML
310 lines
7.9 KiB
YAML
# Development Environment Overrides
|
|
# Custom PHP Framework - Development Tools and Debugging
|
|
version: '3.8'
|
|
|
|
services:
|
|
php:
|
|
build:
|
|
target: development
|
|
args:
|
|
- ENV=development
|
|
- XDEBUG_ENABLE=true
|
|
- COMPOSER_INSTALL_FLAGS=--dev --optimize-autoloader
|
|
environment:
|
|
APP_ENV: development
|
|
APP_DEBUG: true
|
|
XDEBUG_MODE: ${XDEBUG_MODE:-develop,debug}
|
|
XDEBUG_CONFIG: "client_host=host.docker.internal client_port=9003 start_with_request=yes"
|
|
XDEBUG_SESSION: 1
|
|
PHP_MEMORY_LIMIT: 1G
|
|
PHP_MAX_EXECUTION_TIME: 0
|
|
PHP_OPCACHE_ENABLE: 0
|
|
PHP_OPCACHE_VALIDATE_TIMESTAMPS: 1
|
|
PHP_ERROR_REPORTING: E_ALL
|
|
PHP_DISPLAY_ERRORS: 1
|
|
PHP_LOG_ERRORS: 1
|
|
volumes:
|
|
# Development bind mounts for live reload
|
|
- type: bind
|
|
source: ../../
|
|
target: /var/www/html
|
|
consistency: cached
|
|
# Override vendor for faster access
|
|
- type: volume
|
|
source: composer_cache_dev
|
|
target: /root/.composer/cache
|
|
# Node modules volume to prevent conflicts
|
|
- type: volume
|
|
source: node_modules
|
|
target: /var/www/html/node_modules
|
|
ports:
|
|
# Expose Xdebug port
|
|
- "9003:9003"
|
|
read_only: false
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 2G
|
|
cpus: '4.0'
|
|
reservations:
|
|
memory: 512M
|
|
cpus: '1.0'
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
labels: "service=php,environment=development"
|
|
|
|
nginx:
|
|
environment:
|
|
APP_ENV: development
|
|
NGINX_WORKER_PROCESSES: 1
|
|
NGINX_WORKER_CONNECTIONS: 1024
|
|
NGINX_ERROR_LOG_LEVEL: debug
|
|
NGINX_ACCESS_LOG_FORMAT: combined
|
|
volumes:
|
|
# Development Nginx config with Vite proxy
|
|
- type: bind
|
|
source: deployment/applications/configs/nginx/development.conf
|
|
target: /etc/nginx/conf.d/default.conf
|
|
read_only: true
|
|
# Local SSL certificates for development
|
|
- type: bind
|
|
source: ../../ssl
|
|
target: /etc/nginx/ssl
|
|
read_only: true
|
|
ports:
|
|
# Additional ports for development
|
|
- "${APP_PORT:-8080}:80"
|
|
- "${APP_SSL_PORT:-8443}:443"
|
|
- "8081:8081" # Alternative port
|
|
read_only: false
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 256M
|
|
cpus: '1.0'
|
|
reservations:
|
|
memory: 64M
|
|
cpus: '0.25'
|
|
|
|
mysql:
|
|
environment:
|
|
# Development database settings
|
|
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-dev_root_password}
|
|
MYSQL_PASSWORD: ${DB_PASSWORD:-dev_password}
|
|
volumes:
|
|
# Development MySQL configuration
|
|
- type: bind
|
|
source: deployment/applications/configs/mysql/development.cnf
|
|
target: /etc/mysql/conf.d/development.cnf
|
|
read_only: true
|
|
# Development data volume
|
|
- type: volume
|
|
source: mysql_data_dev
|
|
target: /var/lib/mysql
|
|
ports:
|
|
# Expose MySQL for development tools
|
|
- "33060:3306"
|
|
read_only: false
|
|
command:
|
|
- mysqld
|
|
- --general-log=1
|
|
- --general-log-file=/var/log/mysql/general.log
|
|
- --slow-query-log=1
|
|
- --slow-query-log-file=/var/log/mysql/slow.log
|
|
- --long-query-time=1
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 1G
|
|
cpus: '2.0'
|
|
reservations:
|
|
memory: 256M
|
|
cpus: '0.5'
|
|
|
|
redis:
|
|
environment:
|
|
REDIS_PASSWORD: ${REDIS_PASSWORD:-dev_redis_password}
|
|
REDIS_MAXMEMORY: 128m
|
|
REDIS_SAVE: "60 1000" # More frequent saves in development
|
|
volumes:
|
|
# Development Redis configuration
|
|
- type: bind
|
|
source: deployment/applications/configs/redis/development.conf
|
|
target: /usr/local/etc/redis/redis.conf
|
|
read_only: true
|
|
- type: volume
|
|
source: redis_data_dev
|
|
target: /data
|
|
ports:
|
|
# Expose Redis for development tools
|
|
- "63790:6379"
|
|
read_only: false
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 256M
|
|
cpus: '0.5'
|
|
reservations:
|
|
memory: 64M
|
|
cpus: '0.25'
|
|
|
|
queue-worker:
|
|
environment:
|
|
APP_ENV: development
|
|
APP_DEBUG: true
|
|
WORKER_QUEUE: development
|
|
WORKER_TIMEOUT: 60
|
|
WORKER_MEMORY_LIMIT: 256
|
|
WORKER_SLEEP: 5
|
|
WORKER_TRIES: 1
|
|
WORKER_DEBUG: true
|
|
read_only: false
|
|
deploy:
|
|
replicas: 1
|
|
resources:
|
|
limits:
|
|
memory: 512M
|
|
cpus: '1.0'
|
|
reservations:
|
|
memory: 128M
|
|
cpus: '0.25'
|
|
|
|
# Development-specific services
|
|
vite:
|
|
image: node:20-alpine
|
|
container_name: ${COMPOSE_PROJECT_NAME:-michaelschiemer}_vite
|
|
working_dir: /app
|
|
command: sh -c "npm install && npm run dev"
|
|
volumes:
|
|
- type: bind
|
|
source: ../../
|
|
target: /app
|
|
consistency: cached
|
|
- type: volume
|
|
source: node_modules
|
|
target: /app/node_modules
|
|
ports:
|
|
- "5173:5173"
|
|
- "24678:24678" # HMR port
|
|
environment:
|
|
NODE_ENV: development
|
|
VITE_DEV_SERVER_HOST: 0.0.0.0
|
|
VITE_DEV_SERVER_PORT: 5173
|
|
CHOKIDAR_USEPOLLING: true
|
|
networks:
|
|
- frontend
|
|
user: "node:node"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 512M
|
|
cpus: '1.0'
|
|
reservations:
|
|
memory: 128M
|
|
cpus: '0.25'
|
|
|
|
mailhog:
|
|
image: mailhog/mailhog:v1.0.1
|
|
container_name: ${COMPOSE_PROJECT_NAME:-michaelschiemer}_mailhog
|
|
ports:
|
|
- "1025:1025" # SMTP
|
|
- "8025:8025" # Web interface
|
|
environment:
|
|
MH_STORAGE: maildir
|
|
MH_MAILDIR_PATH: /maildir
|
|
volumes:
|
|
- type: volume
|
|
source: mailhog_data
|
|
target: /maildir
|
|
networks:
|
|
- backend
|
|
- frontend
|
|
user: "mailhog:mailhog"
|
|
read_only: true
|
|
tmpfs:
|
|
- /tmp:noexec,nosuid,size=100m
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 128M
|
|
cpus: '0.25'
|
|
reservations:
|
|
memory: 64M
|
|
cpus: '0.1'
|
|
|
|
phpmyadmin:
|
|
image: phpmyadmin:5.2-apache
|
|
container_name: ${COMPOSE_PROJECT_NAME:-michaelschiemer}_phpmyadmin
|
|
environment:
|
|
PMA_HOST: mysql
|
|
PMA_USER: ${DB_USERNAME:-dev_user}
|
|
PMA_PASSWORD: ${DB_PASSWORD:-dev_password}
|
|
PMA_ABSOLUTE_URI: http://localhost:8080/phpmyadmin/
|
|
UPLOAD_LIMIT: 64M
|
|
MEMORY_LIMIT: 512M
|
|
MAX_EXECUTION_TIME: 600
|
|
ports:
|
|
- "8080:80"
|
|
networks:
|
|
- backend
|
|
- frontend
|
|
depends_on:
|
|
mysql:
|
|
condition: service_healthy
|
|
read_only: false
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 256M
|
|
cpus: '0.5'
|
|
reservations:
|
|
memory: 128M
|
|
cpus: '0.25'
|
|
|
|
redis-commander:
|
|
image: rediscommander/redis-commander:latest
|
|
container_name: ${COMPOSE_PROJECT_NAME:-michaelschiemer}_redis_commander
|
|
environment:
|
|
REDIS_HOSTS: local:redis:6379:0:${REDIS_PASSWORD:-dev_redis_password}
|
|
HTTP_USER: admin
|
|
HTTP_PASSWORD: ${REDIS_COMMANDER_PASSWORD:-dev_admin_password}
|
|
ports:
|
|
- "8081:8081"
|
|
networks:
|
|
- cache
|
|
- frontend
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
user: "node:node"
|
|
read_only: true
|
|
tmpfs:
|
|
- /tmp:noexec,nosuid,size=100m
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 128M
|
|
cpus: '0.25'
|
|
reservations:
|
|
memory: 64M
|
|
cpus: '0.1'
|
|
|
|
volumes:
|
|
# Development volumes
|
|
composer_cache_dev:
|
|
name: ${COMPOSE_PROJECT_NAME:-michaelschiemer}_composer_cache_dev
|
|
node_modules:
|
|
name: ${COMPOSE_PROJECT_NAME:-michaelschiemer}_node_modules
|
|
mysql_data_dev:
|
|
name: ${COMPOSE_PROJECT_NAME:-michaelschiemer}_mysql_data_dev
|
|
redis_data_dev:
|
|
name: ${COMPOSE_PROJECT_NAME:-michaelschiemer}_redis_data_dev
|
|
mailhog_data:
|
|
name: ${COMPOSE_PROJECT_NAME:-michaelschiemer}_mailhog_data |