2022-09-20 21:59:52 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Console;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
|
|
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
|
|
|
|
|
|
|
|
|
class Kernel extends ConsoleKernel
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* The Artisan commands provided by your application.
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
protected $commands = [
|
|
|
|
|
//
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Define the application's command schedule.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
protected function schedule(Schedule $schedule)
|
|
|
|
|
{
|
|
|
|
|
$schedule->command('forms:database-cleanup')->hourly();
|
2024-03-28 18:14:30 +01:00
|
|
|
$schedule->command('forms:integration-events-cleanup')->daily();
|
Enhance Docker Configuration and Health Checks (#761)
* Enhance Docker Configuration and Health Checks
- Added PHP configuration settings in `docker-compose.dev.yml` and `docker-compose.yml` to improve memory management and execution limits, ensuring better performance for PHP applications.
- Introduced health checks for various services including `api`, `api-worker`, `api-scheduler`, `ui`, `redis`, and `db` to ensure service availability and reliability.
- Updated environment variables in `.env.docker` and `client/.env.docker` to include new keys for H-Captcha and reCAPTCHA, enhancing security features.
- Refactored the PHP-FPM entrypoint script to apply PHP configurations dynamically based on environment variables, improving flexibility in deployment.
- Removed outdated PHP configuration files to streamline the Docker setup.
These changes aim to enhance the overall stability, performance, and security of the application in a Dockerized environment.
* Refactor Dockerfile for Improved Build Process
- Changed the Dockerfile to utilize a multi-stage build approach, separating the build and runtime environments for better efficiency.
- Introduced a builder stage using the PHP CLI image to install dependencies and extensions, optimizing the final image size.
- Removed unnecessary installation steps and combined related commands to streamline the Dockerfile, enhancing readability and maintainability.
- Updated the runtime stage to use the PHP FPM Alpine image, ensuring a smaller and more secure production environment.
These changes aim to improve the build process, reduce image size, and enhance the overall performance of the Dockerized application.
2025-05-20 19:20:44 +02:00
|
|
|
if (config('app.self_hosted')) {
|
|
|
|
|
$schedule->command('app:scheduler-status --mode=record')->everyMinute();
|
|
|
|
|
}
|
2022-09-20 21:59:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Register the commands for the application.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
protected function commands()
|
|
|
|
|
{
|
2024-03-28 18:14:30 +01:00
|
|
|
$this->load(__DIR__ . '/Commands');
|
2022-09-20 21:59:52 +02:00
|
|
|
|
|
|
|
|
require base_path('routes/console.php');
|
|
|
|
|
}
|
|
|
|
|
}
|