Skip to content

Commit

Permalink
Add Server Watch
Browse files Browse the repository at this point in the history
  • Loading branch information
VNCHub committed Jun 21, 2024
1 parent 6de7814 commit e2c3e30
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 2 deletions.
23 changes: 23 additions & 0 deletions .watcher.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
use Hyperf\Watcher\Driver\ScanFileDriver;

return [
'driver' => ScanFileDriver::class,
'bin' => PHP_BINARY,
'watch' => [
'dir' => ['app', 'config'],
'file' => ['.env'],
'scan_interval' => 2000,
],
'ext' => ['.php', '.env'],
];
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ RUN composer install && php bin/hyperf.php

EXPOSE 9501

ENTRYPOINT ["php", "/opt/www/bin/hyperf.php", "start"]
ENTRYPOINT ["php", "/opt/www/bin/hyperf.php", "server:watch"]
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"friendsofphp/php-cs-fixer": "^3.0",
"hyperf/devtool": "~3.1.0",
"hyperf/testing": "~3.1.0",
"hyperf/watcher": "^3.1",
"mockery/mockery": "^1.0",
"phpstan/phpstan": "^1.0",
"swoole/ide-helper": "^5.0"
Expand Down
68 changes: 67 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e2c3e30

Please sign in to comment.