Starts Notifications feature. Missing to send email with runtime configs.

This commit is contained in:
Joao Patricio
2023-05-19 18:01:56 +01:00
parent cd5655bd3f
commit 13fda50aac
16 changed files with 334 additions and 35 deletions

View File

@@ -3,11 +3,13 @@
namespace App\Providers;
use App\Jobs\CoolifyTask;
use Illuminate\Mail\MailManager;
use Illuminate\Queue\Events\JobProcessed;
use Illuminate\Support\Facades\Process;
use Illuminate\Support\Facades\Queue;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
use Symfony\Component\Mailer\Transport\Smtp\SmtpTransport;
class AppServiceProvider extends ServiceProvider
{
@@ -26,6 +28,10 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot(): void
{
if (! $this->app->environment('production')) {
\Illuminate\Support\Facades\Mail::alwaysTo('noone@example.com');
}
Queue::after(function (JobProcessed $event) {
// @TODO: Remove `coolify-builder` container after the remoteProcess job is finishged and remoteProcess->type == `deployment`.
if ($event->job->resolveName() === CoolifyTask::class) {