Skip to content

Commit

Permalink
Make the bin files used by Swoole and Roadrunner config options (#502)
Browse files Browse the repository at this point in the history
* make the bin file used by swoole and roadrunner configurable options

* Update StartRoadRunnerCommand.php

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
jedjones-uk and taylorotwell authored Apr 8, 2022
1 parent d58de04 commit a6ac540
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Commands/StartRoadRunnerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function handle(ServerProcessInspector $inspector, ServerStateFile $serve
'-c', $this->configPath(),
'-o', 'version=2.7',
'-o', 'http.address='.$this->option('host').':'.$this->option('port'),
'-o', 'server.command='.(new PhpExecutableFinder)->find().' '.base_path('vendor/bin/roadrunner-worker'),
'-o', 'server.command='.(new PhpExecutableFinder)->find().' '.base_path(config('octane.roadrunner.command', 'vendor/bin/roadrunner-worker')),
'-o', 'http.pool.num_workers='.$this->workerCount(),
'-o', 'http.pool.max_jobs='.$this->option('max-requests'),
'-o', 'rpc.listen=tcp://'.$this->option('host').':'.$this->rpcPort(),
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/StartSwooleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function handle(
$this->forgetEnvironmentVariables();

$server = tap(new Process([
(new PhpExecutableFinder)->find(), 'swoole-server', $serverStateFile->path(),
(new PhpExecutableFinder)->find(), config('octane.swoole.command', 'swoole-server'), $serverStateFile->path(),
], realpath(__DIR__.'/../../bin'), [
'APP_ENV' => app()->environment(),
'APP_BASE_PATH' => base_path(),
Expand Down

0 comments on commit a6ac540

Please sign in to comment.