Skip to content

Commit

Permalink
pulse worker
Browse files Browse the repository at this point in the history
  • Loading branch information
fabio-ivona committed Dec 11, 2023
1 parent bd361a2 commit 73827f5
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
18 changes: 18 additions & 0 deletions app/Recipes/Laravel/Containers/Pulse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php


namespace App\Recipes\Laravel\Containers;


use App\Containers\Php;

class Pulse extends Php
{
protected string $service_name = 'pulse';

public function __construct()
{
parent::__construct();
$this->set_target('pulse');
}
}
9 changes: 9 additions & 0 deletions app/Recipes/Laravel/LaravelRecipe.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
use App\Recipes\Laravel\Commands\Watch;
use App\Containers\Php;
use App\Recipes\Laravel\Containers\Dusk;
use App\Recipes\Laravel\Containers\Pulse;
use App\Recipes\Laravel\Containers\Scheduler;
use App\Recipes\Laravel\Containers\Websocket;
use App\Recipes\Laravel\Containers\Worker;
Expand Down Expand Up @@ -251,6 +252,14 @@ public function build()
$dusk->set_link($nginx->service_name(), env('HOST'));
}



if(!empty(env('ENABLE_PULSE'))){
$this->add_container(Pulse::class)
->add_network($this->internal_network())
->depends_on('mysql')
->depends_on('redis');
}
}

private function build_php(): Php
Expand Down
8 changes: 8 additions & 0 deletions storage/app/env/Laravel
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,12 @@ WEBSOCKET_PORT=
#######################
# Browser Tests #
#######################

ENABLE_BROWSER_TESTS=


#######################
# Pulse Server Checks #
#######################

ENABLE_PULSE=

0 comments on commit 73827f5

Please sign in to comment.