- Add highly optimized Dockerfile with Nginx and PHP-FPM 8.4 - Add docker-compose.yml configured with Redis and MariaDB 10.11 - Implement entrypoint.sh and supervisord.conf for background workers - Refactor legacy IMAP scripts into scheduled Artisan Commands - Secure app by removing old routes with hardcoded basic auth credentials - Configure email attachments to use Laravel Storage instead of insecure public/tmp
22 lines
495 B
PHP
22 lines
495 B
PHP
<?php
|
|
|
|
// 1. Bootstrap Laravel
|
|
require __DIR__.'/vendor/autoload.php';
|
|
|
|
$app = require __DIR__.'/bootstrap/app.php';
|
|
|
|
// 2. Start Laravel container
|
|
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
|
$kernel->bootstrap();
|
|
|
|
set_time_limit(0);
|
|
|
|
try {
|
|
// Run the new Artisan command fallback
|
|
$exitCode = $kernel->call('mailbox:clean');
|
|
$output = $kernel->output();
|
|
echo $output;
|
|
} catch (\Exception $e) {
|
|
echo 'Error running Artisan command: '.$e->getMessage();
|
|
}
|