An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
wip
Joao Patricio75326f662698
diff --git a/Dockerfile b/Dockerfiledeleted file mode 100644index 6ccc387640..0000000000--- a/Dockerfile+++ /dev/null@@ -1,30 +0,0 @@-FROM serversideup/php:8.2-fpm-nginx--ARG NODE_VERSION=18-ARG POSTGRES_VERSION=15--RUN apt-get update \- && curl -sLS https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - \- && apt-get install -y nodejs \- && npm install -g npm--RUN apt-get install -y php-pgsql openssh-client--RUN apt-get -y autoremove \- && apt-get clean \- && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*--# Adding Coolify User and SSH key to connect to the Testing-Host (which is simulation of a VPS)-RUN useradd -ms /bin/bash coolify-USER coolify-RUN mkdir -p ~/.ssh-RUN echo "-----BEGIN OPENSSH PRIVATE KEY-----\n\-b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\n\-QyNTUxOQAAACBbhpqHhqv6aI67Mj9abM3DVbmcfYhZAhC7ca4d9UCevAAAAJi/QySHv0Mk\n\-hwAAAAtzc2gtZWQyNTUxOQAAACBbhpqHhqv6aI67Mj9abM3DVbmcfYhZAhC7ca4d9UCevA\n\-AAAECBQw4jg1WRT2IGHMncCiZhURCts2s24HoDS0thHnnRKVuGmoeGq/pojrsyP1pszcNV\n\-uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==\n\------END OPENSSH PRIVATE KEY-----" >> ~/.ssh/id_ed25519-RUN chmod 0600 ~/.ssh/id_ed25519--USER rootdiff --git a/app/Http/Livewire/RunCommand.php b/app/Http/Livewire/RunCommand.phpnew file mode 100755index 0000000000..e99ca0da1f--- /dev/null+++ b/app/Http/Livewire/RunCommand.php@@ -0,0 +1,51 @@+<?php++namespace App\Http\Livewire;++use Livewire\Component;++class RunCommand extends Component+{+ public $activity;++ public $isKeepAliveOn = false;++ public $manualKeepAlive = false;++ public $command = '';++ public function render()+ {+ return view('livewire.run-command');+ }++ public function runCommand()+ {+ // TODO Execute with Livewire Normally+ $this->activity = coolifyProcess($this->command, 'testing-host');+++ // Override manual to experiment+// $sleepingBeauty = 'x=1; while [ $x -le 40 ]; do sleep 0.1 && echo "Welcome $x times" $(( x++ )); done';+//+// $commandString = <<<EOT+// cd projects/dummy-project+// ~/.docker/cli-plugins/docker-compose build --no-cache+// # $sleepingBeauty+// EOT;+//+// $this->activity = coolifyProcess($commandString, 'testing-host');+++ $this->isKeepAliveOn = true;+ }++ public function polling()+ {+ $this->activity?->refresh();++ if ($this->activity?->properties['status'] === 'finished') {+ $this->isKeepAliveOn = false;+ }+ }+}diff --git a/app/Jobs/ExecuteCoolifyProcess.php b/app/Jobs/ExecuteCoolifyProcess.phpnew file mode 100755index 0000000000..d1ba2c478f--- /dev/null+++ b/app/Jobs/ExecuteCoolifyProcess.php@@ -0,0 +1,131 @@+<?php++namespace App\Jobs;++use Illuminate\Support\Facades\DB;+use Illuminate\Bus\Queueable;+use Illuminate\Contracts\Queue\ShouldBeUnique;+use Illuminate\Contracts\Queue\ShouldQueue;+use Illuminate\Foundation\Bus\Dispatchable;+use Illuminate\Process\InvokedProcess;+use Illuminate\Process\ProcessResult;+use Illuminate\Queue\InteractsWithQueue;+use Illuminate\Queue\SerializesModels;+use Illuminate\Support\Facades\File;+use Illuminate\Support\Facades\Process;+use Spatie\Activitylog\Contracts\Activity;++class ExecuteCoolifyProcess implements ShouldQueue+{+ use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;++ protected $throttleIntervalMS = 500;++ protected $timeStart;++ protected $currentTime;++ protected $lastWriteAt = 0;++ protected string $stdOutIncremental = '';++ protected string $stdErrIncremental = '';++ /**+ * Create a new job instance.+ */+ public function __construct(+ public Activity $activity,+ ){}++ /**+ * Execute the job.+ */+ public function handle(): ?ProcessResult+ {+ ray()->clearAll();+ $this->timeStart = $start = hrtime(true);++ $user = $this->activity->getExtraProperty('user');+ $destination = $this->activity->getExtraProperty('destination');+ $port = $this->activity->getExtraProperty('port');+ $command = $this->activity->getExtraProperty('command');++ $delimiter = 'EOF-COOLIFY-SSH';++ File::chmod(base_path('coolify_id25519'), '0600');++ $sshCommand = 'ssh '+ . '-i ./coolify_id25519'+ . '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null '+ . '-o PasswordAuthentication=no '+ . "{$user}@{$destination} "+ . " 'bash -se' << \\$delimiter" . PHP_EOL+ . $command . PHP_EOL+ . $delimiter;++// $sshCommand = "whoami ; pwd ; ls ";++ $process = Process::start(+ $sshCommand,+ $this->handleOutput(...),+ );+++ $res = $process->wait();++ if (app()->environment('testing')) {+ return $res;+ }++ // TODO Why is this not persisting?? Immutable property??+ $this->activity->properties->put('pid', $process->id());+ $this->activity->properties->put('exitCode', $res->exitCode());+ $this->activity->properties->put('stdout', $res->output());+ $this->activity->properties->put('stderr', $res->errorOutput());+ $this->activity->save();+ }++ protected function handleOutput(string $type, string $output)+ {+ $this->currentTime = $this->elapsedTime();++ if ($type === 'out') {+ $this->stdOutIncremental .= $output;+ } else {+ $this->stdErrIncremental .= $output;+ }++ $this->activity->description .= $output;++ if ($this->isAfterLastThrottle()) {+ // Let's write to database.+ DB::transaction(function () {+ $this->activity->save();+ $this->lastWriteAt = $this->currentTime;+ });+ }+ }++ /**+ * Decides if it's time to write again to database.+ *+ * @return bool+ */+ protected function isAfterLastThrottle()+ {+ // If DB was never written, then we immediately decide we have to write.+ if ($this->lastWriteAt === 0) {+ return true;+ }++ return ($this->currentTime - $this->throttleIntervalMS) > $this->lastWriteAt;+ }++ protected function elapsedTime(): int+ {+ $timeMs = (hrtime(true) - $this->timeStart) / 1_000_000;++ return intval($timeMs);+ }+}diff --git a/app/Services/CoolifyProcess.php b/app/Services/CoolifyProcess.phpnew file mode 100644index 0000000000..bc21bda987--- /dev/null+++ b/app/Services/CoolifyProcess.php@@ -0,0 +1,45 @@+<?php++namespace App\Services;++use App\Jobs\ExecuteCoolifyProcess;+use Illuminate\Process\ProcessResult;+use Spatie\Activitylog\Contracts\Activity;++class CoolifyProcess+{+ protected Activity $activity;++ // TODO Left 'root' as default user instead of 'coolify' because+ // there's a task at TODO.md to run docker without sudo+ public function __construct(+ protected string $destination,+ protected string $command,+ protected ?int $port = 22,+ protected ?string $user = 'root',+ ){+ $this->activity = activity()+ ->withProperty('type', 'COOLIFY_PROCESS')+ ->withProperty('user', $this->user)+ ->withProperty('destination', $this->destination)+ ->withProperty('port', $this->port)+ ->withProperty('command', $this->command)+ ->withProperty('status', ProcessStatus::HOLDING)+ ->log("Awaiting to start command...\n\n");+ }++ public function __invoke(): Activity|ProcessResult+ {+ $job = new ExecuteCoolifyProcess($this->activity);++ if (app()->environment('testing')) {+ return $job->handle();+ }++ dispatch($job);++ return $this->activity;+ }+++}diff --git a/app/Services/ProcessStatus.php b/app/Services/ProcessStatus.phpnew file mode 100644index 0000000000..a835d29d34--- /dev/null+++ b/app/Services/ProcessStatus.php@@ -0,0 +1,11 @@+<?php++namespace App\Services;++enum ProcessStatus: string+{+ case HOLDING = 'holding';+ case IN_PROGRESS = 'in_progress';+ case FINISHED = 'finished';+ case ERROR = 'error';+}diff --git a/app/Services/Ssh.php b/app/Services/Ssh.phpnew file mode 100644index 0000000000..32ee4ee507--- /dev/null+++ b/app/Services/Ssh.php@@ -0,0 +1,259 @@+<?php++namespace App\Services;++use Closure;+use Exception;+use Symfony\Component\Process\Process;++/**+ * Started from a copy of spatie/ssh+ */+class Ssh+{+ protected string $user;++ protected string $host;++ protected array $extraOptions = [];++ protected Closure $processConfigurationClosure;++ protected Closure $onOutput;++ public function __construct(string $user, string $host, int $port = null)+ {+ $this->user = $user;++ $this->host = $host;++ if ($port !== null) {+ $this->usePort($port);+ }++ $this->processConfigurationClosure = fn(Process $process) => null;++ $this->onOutput = fn($type, $line) => null;+ }++ public static function create(...$args): self+ {+ return new static(...$args);+ }++ public function usePrivateKey(string $pathToPrivateKey): self+ {+ $this->extraOptions['private_key'] = '-i ' . $pathToPrivateKey;++ return $this;+ }++ public function useJumpHost(string $jumpHost): self+ {+ $this->extraOptions['jump_host'] = '-J ' . $jumpHost;++ return $this;+ }++ public function usePort(int $port): self+ {+ if ($port < 0) {+ throw new Exception('Port must be a positive integer.');+ }+ $this->extraOptions['port'] = '-p ' . $port;++ return $this;+ }++ public function useMultiplexing(string $controlPath, string $controlPersist = '10m'): self+ {+ $this->extraOptions['control_master'] = '-o ControlMaster=auto -o ControlPath=' . $controlPath . ' -o ControlPersist=' . $controlPersist;++ return $this;+ }++ public function configureProcess(Closure $processConfigurationClosure): self+ {+ $this->processConfigurationClosure = $processConfigurationClosure;++ return $this;+ }++ public function onOutput(Closure $onOutput): self+ {+ $this->onOutput = $onOutput;++ return $this;+ }++ public function enableStrictHostKeyChecking(): self+ {+ unset($this->extraOptions['enable_strict_check']);++ return $this;+ }++ public function disableStrictHostKeyChecking(): self+ {+ $this->extraOptions['enable_strict_check'] = '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null';++ return $this;+ }++ public function enableQuietMode(): self+ {+ $this->extraOptions['quiet'] = '-q';++ return $this;+ }++ public function disableQuietMode(): self+ {+ unset($this->extraOptions['quiet']);++ return $this;+ }++ public function disablePasswordAuthentication(): self+ {+ $this->extraOptions['password_authentication'] = '-o PasswordAuthentication=no';++ return $this;+ }++ public function enablePasswordAuthentication(): self+ {+ unset($this->extraOptions['password_authentication']);++ return $this;+ }++ public function addExtraOption(string $option): self+ {+ $this->extraOptions[] = $option;++ return $this;+ }++ /**+ * @param string|array $command+ *+ * @return string+ */+ public function getExecuteCommand($command): string+ {+ $commands = $this->wrapArray($command);++ $extraOptions = implode(' ', $this->getExtraOptions());++ $commandString = implode(PHP_EOL, $commands);++ $delimiter = 'EOF-SPATIE-SSH';++ $target = $this->getTargetForSsh();++ if (in_array($this->host, ['local', 'localhost', '127.0.0.1'])) {+ return $commandString;+ }++ return "ssh {$extraOptions} {$target} 'bash -se' << \\$delimiter" . PHP_EOL+ . $commandString . PHP_EOL+ . $delimiter;+ }++ /**+ * @param string|array $command+ *+ * @return \Symfony\Component\Process\Process+ **/+ public function execute($command): Process+ {+ $sshCommand = $this->getExecuteCommand($command);++ return $this->run($sshCommand);+ }++ /**+ * @param string|array $command+ *+ * @return \Symfony\Component\Process\Process+ */+ public function executeAsync($command): Process+ {+ $sshCommand = $this->getExecuteCommand($command);++ return $this->run($sshCommand, 'start');+ }++ public function getDownloadCommand(string $sourcePath, string $destinationPath): string+ {+ return "scp {$this->getExtraScpOptions()} {$this->getTargetForScp()}:$sourcePath $destinationPath";+ }++ public function download(string $sourcePath, string $destinationPath): Process+ {+ $downloadCommand = $this->getDownloadCommand($sourcePath, $destinationPath);++ return $this->run($downloadCommand);+ }++ public function getUploadCommand(string $sourcePath, string $destinationPath): string+ {+ return "scp {$this->getExtraScpOptions()} $sourcePath {$this->getTargetForScp()}:$destinationPath";+ }++ public function upload(string $sourcePath, string $destinationPath): Process+ {+ $uploadCommand = $this->getUploadCommand($sourcePath, $destinationPath);++ return $this->run($uploadCommand);+ }++ protected function getExtraScpOptions(): string+ {+ $extraOptions = $this->extraOptions;++ if (isset($extraOptions['port'])) {+ $extraOptions['port'] = str_replace('-p', '-P', $extraOptions['port']);+ }++ $extraOptions[] = '-r';++ return implode(' ', array_values($extraOptions));+ }++ private function getExtraOptions(): array+ {+ return array_values($this->extraOptions);+ }++ protected function wrapArray($arrayOrString): array+ {+ return (array)$arrayOrString;+ }++ protected function run(string $command, string $method = 'run'): Process+ {+ $process = Process::fromShellCommandline($command);++ $process->setTimeout(0);++ ($this->processConfigurationClosure)($process);++ $process->{$method}($this->onOutput);++ return $process;+ }++ protected function getTargetForScp(): string+ {+ $host = filter_var($this->host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) ? '[' . $this->host . ']' : $this->host;++ return "{$this->user}@{$host}";+ }++ protected function getTargetForSsh(): string+ {+ return "{$this->user}@{$this->host}";+ }+}diff --git a/bootstrap/helpers.php b/bootstrap/helpers.phpnew file mode 100644index 0000000000..0d48f54012--- /dev/null+++ b/bootstrap/helpers.php@@ -0,0 +1,24 @@+<?php++use App\Services\CoolifyProcess;+use Illuminate\Process\ProcessResult;+use Spatie\Activitylog\Contracts\Activity;++if (! function_exists('coolifyProcess')) {++ /**+ * Run a Coolify Process, which SSH's into a machine to run the command(s).+ *+ */+ function coolifyProcess($command, $destination): Activity|ProcessResult+ {+ $process = resolve(CoolifyProcess::class, [+ 'destination' => $destination,+ 'command' => $command,+ ]);++ $activityLog = $process();++ return $activityLog;+ }+}diff --git a/composer.json b/composer.jsonindex 4958668f0e..db88251ca3 100644--- a/composer.json+++ b/composer.json@@ -9,7 +9,10 @@"guzzlehttp/guzzle": "^7.2","laravel/framework": "^10.0","laravel/sanctum": "^3.2",- "laravel/tinker": "^2.8"+ "laravel/tinker": "^2.8",+ "livewire/livewire": "^2.12",+ "spatie/laravel-activitylog": "^4.7",+ "spatie/laravel-ray": "^1.32"},"require-dev": {"fakerphp/faker": "^1.9.1",@@ -21,6 +24,9 @@"spatie/laravel-ignition": "^2.0"},"autoload": {+ "files": [+ "bootstrap/helpers.php"+ ],"psr-4": {"App\\": "app/","Database\\Factories\\": "database/factories/",diff --git a/composer.lock b/composer.lockindex 9976cf5aeb..ca08edfc6d 100644--- a/composer.lock+++ b/composer.lock@@ -4,7 +4,7 @@"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies","This file is @generated automatically"],- "content-hash": "121ea3a2fffe49b3ef9aa4d064b28c19",+ "content-hash": "262dce663830cec0e39428d0d3d76c7e","packages": [{"name": "brick/math",@@ -1709,6 +1709,79 @@],"time": "2022-04-17T13:12:02+00:00"},+ {+ "name": "livewire/livewire",+ "version": "v2.12.3",+ "source": {+ "type": "git",+ "url": "https://github.com/livewire/livewire.git",+ "reference": "019b1e69d8cd8c7e749eba7a38e4fa69ecbc8f74"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/livewire/livewire/zipball/019b1e69d8cd8c7e749eba7a38e4fa69ecbc8f74",+ "reference": "019b1e69d8cd8c7e749eba7a38e4fa69ecbc8f74",+ "shasum": ""+ },+ "require": {+ "illuminate/database": "^7.0|^8.0|^9.0|^10.0",+ "illuminate/support": "^7.0|^8.0|^9.0|^10.0",+ "illuminate/validation": "^7.0|^8.0|^9.0|^10.0",+ "league/mime-type-detection": "^1.9",+ "php": "^7.2.5|^8.0",+ "symfony/http-kernel": "^5.0|^6.0"+ },+ "require-dev": {+ "calebporzio/sushi": "^2.1",+ "laravel/framework": "^7.0|^8.0|^9.0|^10.0",+ "mockery/mockery": "^1.3.1",+ "orchestra/testbench": "^5.0|^6.0|^7.0|^8.0",+ "orchestra/testbench-dusk": "^5.2|^6.0|^7.0|^8.0",+ "phpunit/phpunit": "^8.4|^9.0",+ "psy/psysh": "@stable"+ },+ "type": "library",+ "extra": {+ "laravel": {+ "providers": [+ "Livewire\\LivewireServiceProvider"+ ],+ "aliases": {+ "Livewire": "Livewire\\Livewire"+ }+ }+ },+ "autoload": {+ "files": [+ "src/helpers.php"+ ],+ "psr-4": {+ "Livewire\\": "src/"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Caleb Porzio",+ "email": "[email protected]"+ }+ ],+ "description": "A front-end framework for Laravel.",+ "support": {+ "issues": "https://github.com/livewire/livewire/issues",+ "source": "https://github.com/livewire/livewire/tree/v2.12.3"+ },+ "funding": [+ {+ "url": "https://github.com/livewire",+ "type": "github"+ }+ ],+ "time": "2023-03-03T20:12:38+00:00"+ },{"name": "monolog/monolog","version": "3.3.1",@@ -2278,6 +2351,59 @@],"time": "2023-02-25T19:38:58+00:00"},+ {+ "name": "pimple/pimple",+ "version": "v3.5.0",+ "source": {+ "type": "git",+ "url": "https://github.com/silexphp/Pimple.git",+ "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a94b3a4db7fb774b3d78dad2315ddc07629e1bed",+ "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed",+ "shasum": ""+ },+ "require": {+ "php": ">=7.2.5",+ "psr/container": "^1.1 || ^2.0"+ },+ "require-dev": {+ "symfony/phpunit-bridge": "^5.4@dev"+ },+ "type": "library",+ "extra": {+ "branch-alias": {+ "dev-master": "3.4.x-dev"+ }+ },+ "autoload": {+ "psr-0": {+ "Pimple": "src/"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Fabien Potencier",+ "email": "[email protected]"+ }+ ],+ "description": "Pimple, a simple Dependency Injection Container",+ "homepage": "https://pimple.symfony.com",+ "keywords": [+ "container",+ "dependency injection"+ ],+ "support": {+ "source": "https://github.com/silexphp/Pimple/tree/v3.5.0"+ },+ "time": "2021-10-28T11:13:42+00:00"+ },{"name": "psr/container","version": "2.0.2",@@ -2943,6 +3069,430 @@],"time": "2023-01-12T18:13:24+00:00"},+ {+ "name": "spatie/backtrace",+ "version": "1.4.0",+ "source": {+ "type": "git",+ "url": "https://github.com/spatie/backtrace.git",+ "reference": "ec4dd16476b802dbdc6b4467f84032837e316b8c"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/spatie/backtrace/zipball/ec4dd16476b802dbdc6b4467f84032837e316b8c",+ "reference": "ec4dd16476b802dbdc6b4467f84032837e316b8c",+ "shasum": ""+ },+ "require": {+ "php": "^7.3|^8.0"+ },+ "require-dev": {+ "ext-json": "*",+ "phpunit/phpunit": "^9.3",+ "spatie/phpunit-snapshot-assertions": "^4.2",+ "symfony/var-dumper": "^5.1"+ },+ "type": "library",+ "autoload": {+ "psr-4": {+ "Spatie\\Backtrace\\": "src"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Freek Van de Herten",+ "email": "[email protected]",+ "homepage": "https://spatie.be",+ "role": "Developer"+ }+ ],+ "description": "A better backtrace",+ "homepage": "https://github.com/spatie/backtrace",+ "keywords": [+ "Backtrace",+ "spatie"+ ],+ "support": {+ "source": "https://github.com/spatie/backtrace/tree/1.4.0"+ },+ "funding": [+ {+ "url": "https://github.com/sponsors/spatie",+ "type": "github"+ },+ {+ "url": "https://spatie.be/open-source/support-us",+ "type": "other"+ }+ ],+ "time": "2023-03-04T08:57:24+00:00"+ },+ {+ "name": "spatie/laravel-activitylog",+ "version": "4.7.3",+ "source": {+ "type": "git",+ "url": "https://github.com/spatie/laravel-activitylog.git",+ "reference": "ec65a478a909b8df1b4f0c3c45de2592ca7639e5"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/spatie/laravel-activitylog/zipball/ec65a478a909b8df1b4f0c3c45de2592ca7639e5",+ "reference": "ec65a478a909b8df1b4f0c3c45de2592ca7639e5",+ "shasum": ""+ },+ "require": {+ "illuminate/config": "^8.0 || ^9.0 || ^10.0",+ "illuminate/database": "^8.69 || ^9.27 || ^10.0",+ "illuminate/support": "^8.0 || ^9.0 || ^10.0",+ "php": "^8.0",+ "spatie/laravel-package-tools": "^1.6.3"+ },+ "require-dev": {+ "ext-json": "*",+ "orchestra/testbench": "^6.23 || ^7.0 || ^8.0",+ "pestphp/pest": "^1.20"+ },+ "type": "library",+ "extra": {+ "laravel": {+ "providers": [+ "Spatie\\Activitylog\\ActivitylogServiceProvider"+ ]+ }+ },+ "autoload": {+ "files": [+ "src/helpers.php"+ ],+ "psr-4": {+ "Spatie\\Activitylog\\": "src"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Freek Van der Herten",+ "email": "[email protected]",+ "homepage": "https://spatie.be",+ "role": "Developer"+ },+ {+ "name": "Sebastian De Deyne",+ "email": "[email protected]",+ "homepage": "https://spatie.be",+ "role": "Developer"+ },+ {+ "name": "Tom Witkowski",+ "email": "[email protected]",+ "homepage": "https://gummibeer.de",+ "role": "Developer"+ }+ ],+ "description": "A very simple activity logger to monitor the users of your website or application",+ "homepage": "https://github.com/spatie/activitylog",+ "keywords": [+ "activity",+ "laravel",+ "log",+ "spatie",+ "user"+ ],+ "support": {+ "issues": "https://github.com/spatie/laravel-activitylog/issues",+ "source": "https://github.com/spatie/laravel-activitylog/tree/4.7.3"+ },+ "funding": [+ {+ "url": "https://spatie.be/open-source/support-us",+ "type": "custom"+ },+ {+ "url": "https://github.com/spatie",+ "type": "github"+ }+ ],+ "time": "2023-01-25T17:04:51+00:00"+ },+ {+ "name": "spatie/laravel-package-tools",+ "version": "1.14.2",+ "source": {+ "type": "git",+ "url": "https://github.com/spatie/laravel-package-tools.git",+ "reference": "bab62023a4745a61170ad5424184533685e73c2d"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/bab62023a4745a61170ad5424184533685e73c2d",+ "reference": "bab62023a4745a61170ad5424184533685e73c2d",+ "shasum": ""+ },+ "require": {+ "illuminate/contracts": "^9.28|^10.0",+ "php": "^8.0"+ },+ "require-dev": {+ "mockery/mockery": "^1.5",+ "orchestra/testbench": "^7.7|^8.0",+ "pestphp/pest": "^1.22",+ "phpunit/phpunit": "^9.5.24",+ "spatie/pest-plugin-test-time": "^1.1"+ },+ "type": "library",+ "autoload": {+ "psr-4": {+ "Spatie\\LaravelPackageTools\\": "src"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Freek Van der Herten",+ "email": "[email protected]",+ "role": "Developer"+ }+ ],+ "description": "Tools for creating Laravel packages",+ "homepage": "https://github.com/spatie/laravel-package-tools",+ "keywords": [+ "laravel-package-tools",+ "spatie"+ ],+ "support": {+ "issues": "https://github.com/spatie/laravel-package-tools/issues",+ "source": "https://github.com/spatie/laravel-package-tools/tree/1.14.2"+ },+ "funding": [+ {+ "url": "https://github.com/spatie",+ "type": "github"+ }+ ],+ "time": "2023-03-14T16:41:21+00:00"+ },+ {+ "name": "spatie/laravel-ray",+ "version": "1.32.3",+ "source": {+ "type": "git",+ "url": "https://github.com/spatie/laravel-ray.git",+ "reference": "8c7ea86c8092bcfe7a046f640b6ac9e5d7ec98cd"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/8c7ea86c8092bcfe7a046f640b6ac9e5d7ec98cd",+ "reference": "8c7ea86c8092bcfe7a046f640b6ac9e5d7ec98cd",+ "shasum": ""+ },+ "require": {+ "ext-json": "*",+ "illuminate/contracts": "^7.20|^8.19|^9.0|^10.0",+ "illuminate/database": "^7.20|^8.19|^9.0|^10.0",+ "illuminate/queue": "^7.20|^8.19|^9.0|^10.0",+ "illuminate/support": "^7.20|^8.19|^9.0|^10.0",+ "php": "^7.4|^8.0",+ "spatie/backtrace": "^1.0",+ "spatie/ray": "^1.37",+ "symfony/stopwatch": "4.2|^5.1|^6.0",+ "zbateson/mail-mime-parser": "^1.3.1|^2.0"+ },+ "require-dev": {+ "guzzlehttp/guzzle": "^7.3",+ "laravel/framework": "^7.20|^8.19|^9.0|^10.0",+ "orchestra/testbench-core": "^5.0|^6.0|^7.0|^8.0",+ "pestphp/pest": "^1.22",+ "phpstan/phpstan": "^0.12.93",+ "phpunit/phpunit": "^9.3",+ "spatie/pest-plugin-snapshots": "^1.1"+ },+ "type": "library",+ "extra": {+ "branch-alias": {+ "dev-main": "1.29.x-dev"+ },+ "laravel": {+ "providers": [+ "Spatie\\LaravelRay\\RayServiceProvider"+ ]+ }+ },+ "autoload": {+ "psr-4": {+ "Spatie\\LaravelRay\\": "src"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Freek Van der Herten",+ "email": "[email protected]",+ "homepage": "https://spatie.be",+ "role": "Developer"+ }+ ],+ "description": "Easily debug Laravel apps",+ "homepage": "https://github.com/spatie/laravel-ray",+ "keywords": [+ "laravel-ray",+ "spatie"+ ],+ "support": {+ "issues": "https://github.com/spatie/laravel-ray/issues",+ "source": "https://github.com/spatie/laravel-ray/tree/1.32.3"+ },+ "funding": [+ {+ "url": "https://github.com/sponsors/spatie",+ "type": "github"+ },+ {+ "url": "https://spatie.be/open-source/support-us",+ "type": "other"+ }+ ],+ "time": "2023-03-03T13:37:21+00:00"+ },+ {+ "name": "spatie/macroable",+ "version": "2.0.0",+ "source": {+ "type": "git",+ "url": "https://github.com/spatie/macroable.git",+ "reference": "ec2c320f932e730607aff8052c44183cf3ecb072"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/spatie/macroable/zipball/ec2c320f932e730607aff8052c44183cf3ecb072",+ "reference": "ec2c320f932e730607aff8052c44183cf3ecb072",+ "shasum": ""+ },+ "require": {+ "php": "^8.0"+ },+ "require-dev": {+ "phpunit/phpunit": "^8.0|^9.3"+ },+ "type": "library",+ "autoload": {+ "psr-4": {+ "Spatie\\Macroable\\": "src"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Freek Van der Herten",+ "email": "[email protected]",+ "homepage": "https://spatie.be",+ "role": "Developer"+ }+ ],+ "description": "A trait to dynamically add methods to a class",+ "homepage": "https://github.com/spatie/macroable",+ "keywords": [+ "macroable",+ "spatie"+ ],+ "support": {+ "issues": "https://github.com/spatie/macroable/issues",+ "source": "https://github.com/spatie/macroable/tree/2.0.0"+ },+ "time": "2021-03-26T22:39:02+00:00"+ },+ {+ "name": "spatie/ray",+ "version": "1.37.1",+ "source": {+ "type": "git",+ "url": "https://github.com/spatie/ray.git",+ "reference": "a915e327f04c0fbed3bdd26e076e39feea091062"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/spatie/ray/zipball/a915e327f04c0fbed3bdd26e076e39feea091062",+ "reference": "a915e327f04c0fbed3bdd26e076e39feea091062",+ "shasum": ""+ },+ "require": {+ "ext-curl": "*",+ "ext-json": "*",+ "php": "^7.3|^8.0",+ "ramsey/uuid": "^3.0|^4.1",+ "spatie/backtrace": "^1.1",+ "spatie/macroable": "^1.0|^2.0",+ "symfony/stopwatch": "^4.0|^5.1|^6.0",+ "symfony/var-dumper": "^4.2|^5.1|^6.0"+ },+ "require-dev": {+ "illuminate/support": "6.x|^8.18|^9.0",+ "nesbot/carbon": "^2.63",+ "pestphp/pest": "^1.22",+ "phpstan/phpstan": "^1.10",+ "phpunit/phpunit": "^9.5",+ "spatie/phpunit-snapshot-assertions": "^4.2",+ "spatie/test-time": "^1.2"+ },+ "type": "library",+ "autoload": {+ "files": [+ "src/helpers.php"+ ],+ "psr-4": {+ "Spatie\\Ray\\": "src"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Freek Van der Herten",+ "email": "[email protected]",+ "homepage": "https://spatie.be",+ "role": "Developer"+ }+ ],+ "description": "Debug with Ray to fix problems faster",+ "homepage": "https://github.com/spatie/ray",+ "keywords": [+ "ray",+ "spatie"+ ],+ "support": {+ "issues": "https://github.com/spatie/ray/issues",+ "source": "https://github.com/spatie/ray/tree/1.37.1"+ },+ "funding": [+ {+ "url": "https://github.com/sponsors/spatie",+ "type": "github"+ },+ {+ "url": "https://spatie.be/open-source/support-us",+ "type": "other"+ }+ ],+ "time": "2023-03-06T07:22:28+00:00"+ },{"name": "symfony/console","version": "v6.2.7",@@ -3801,7 +4351,89 @@"mime-type"],"support": {- "source": "https://github.com/symfony/mime/tree/v6.2.7"+ "source": "https://github.com/symfony/mime/tree/v6.2.7"+ },+ "funding": [+ {+ "url": "https://symfony.com/sponsor",+ "type": "custom"+ },+ {+ "url": "https://github.com/fabpot",+ "type": "github"+ },+ {+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",+ "type": "tidelift"+ }+ ],+ "time": "2023-02-24T10:42:00+00:00"+ },+ {+ "name": "symfony/polyfill-ctype",+ "version": "v1.27.0",+ "source": {+ "type": "git",+ "url": "https://github.com/symfony/polyfill-ctype.git",+ "reference": "5bbc823adecdae860bb64756d639ecfec17b050a"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",+ "reference": "5bbc823adecdae860bb64756d639ecfec17b050a",+ "shasum": ""+ },+ "require": {+ "php": ">=7.1"+ },+ "provide": {+ "ext-ctype": "*"+ },+ "suggest": {+ "ext-ctype": "For best performance"+ },+ "type": "library",+ "extra": {+ "branch-alias": {+ "dev-main": "1.27-dev"+ },+ "thanks": {+ "name": "symfony/polyfill",+ "url": "https://github.com/symfony/polyfill"+ }+ },+ "autoload": {+ "files": [+ "bootstrap.php"+ ],+ "psr-4": {+ "Symfony\\Polyfill\\Ctype\\": ""+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Gert de Pagter",+ "email": "[email protected]"+ },+ {+ "name": "Symfony Community",+ "homepage": "https://symfony.com/contributors"+ }+ ],+ "description": "Symfony polyfill for ctype functions",+ "homepage": "https://symfony.com",+ "keywords": [+ "compatibility",+ "ctype",+ "polyfill",+ "portable"+ ],+ "support": {+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0"},"funding": [{@@ -3817,30 +4449,30 @@"type": "tidelift"}],- "time": "2023-02-24T10:42:00+00:00"+ "time": "2022-11-03T14:55:06+00:00"},{- "name": "symfony/polyfill-ctype",+ "name": "symfony/polyfill-iconv","version": "v1.27.0","source": {"type": "git",- "url": "https://github.com/symfony/polyfill-ctype.git",- "reference": "5bbc823adecdae860bb64756d639ecfec17b050a"+ "url": "https://github.com/symfony/polyfill-iconv.git",+ "reference": "927013f3aac555983a5059aada98e1907d842695"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",- "reference": "5bbc823adecdae860bb64756d639ecfec17b050a",+ "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/927013f3aac555983a5059aada98e1907d842695",+ "reference": "927013f3aac555983a5059aada98e1907d842695","shasum": ""},"require": {"php": ">=7.1"},"provide": {- "ext-ctype": "*"+ "ext-iconv": "*"},"suggest": {- "ext-ctype": "For best performance"+ "ext-iconv": "For best performance"},"type": "library","extra": {@@ -3857,7 +4489,7 @@"bootstrap.php"],"psr-4": {- "Symfony\\Polyfill\\Ctype\\": ""+ "Symfony\\Polyfill\\Iconv\\": ""}},"notification-url": "https://packagist.org/downloads/",@@ -3866,24 +4498,25 @@],"authors": [{- "name": "Gert de Pagter",- "email": "[email protected]"+ "name": "Nicolas Grekas",+ "email": "[email protected]"},{"name": "Symfony Community","homepage": "https://symfony.com/contributors"}],- "description": "Symfony polyfill for ctype functions",+ "description": "Symfony polyfill for the Iconv extension","homepage": "https://symfony.com","keywords": ["compatibility",- "ctype",+ "iconv","polyfill",- "portable"+ "portable",+ "shim"],"support": {- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0"+ "source": "https://github.com/symfony/polyfill-iconv/tree/v1.27.0"},"funding": [{@@ -4711,6 +5344,68 @@],"time": "2023-03-01T10:32:47+00:00"},+ {+ "name": "symfony/stopwatch",+ "version": "v6.2.7",+ "source": {+ "type": "git",+ "url": "https://github.com/symfony/stopwatch.git",+ "reference": "f3adc98c1061875dd2edcd45e5b04e63d0e29f8f"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f3adc98c1061875dd2edcd45e5b04e63d0e29f8f",+ "reference": "f3adc98c1061875dd2edcd45e5b04e63d0e29f8f",+ "shasum": ""+ },+ "require": {+ "php": ">=8.1",+ "symfony/service-contracts": "^1|^2|^3"+ },+ "type": "library",+ "autoload": {+ "psr-4": {+ "Symfony\\Component\\Stopwatch\\": ""+ },+ "exclude-from-classmap": [+ "/Tests/"+ ]+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Fabien Potencier",+ "email": "[email protected]"+ },+ {+ "name": "Symfony Community",+ "homepage": "https://symfony.com/contributors"+ }+ ],+ "description": "Provides a way to profile code",+ "homepage": "https://symfony.com",+ "support": {+ "source": "https://github.com/symfony/stopwatch/tree/v6.2.7"+ },+ "funding": [+ {+ "url": "https://symfony.com/sponsor",+ "type": "custom"+ },+ {+ "url": "https://github.com/fabpot",+ "type": "github"+ },+ {+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",+ "type": "tidelift"+ }+ ],+ "time": "2023-02-14T08:44:56+00:00"+ },{"name": "symfony/string","version": "v6.2.7",@@ -5406,6 +6101,213 @@"source": "https://github.com/webmozarts/assert/tree/1.11.0"},"time": "2022-06-03T18:03:27+00:00"+ },+ {+ "name": "zbateson/mail-mime-parser",+ "version": "2.4.0",+ "source": {+ "type": "git",+ "url": "https://github.com/zbateson/mail-mime-parser.git",+ "reference": "20b3e48eb799537683780bc8782fbbe9bc25934a"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/zbateson/mail-mime-parser/zipball/20b3e48eb799537683780bc8782fbbe9bc25934a",+ "reference": "20b3e48eb799537683780bc8782fbbe9bc25934a",+ "shasum": ""+ },+ "require": {+ "guzzlehttp/psr7": "^1.7.0|^2.0",+ "php": ">=7.1",+ "pimple/pimple": "^3.0",+ "zbateson/mb-wrapper": "^1.0.1",+ "zbateson/stream-decorators": "^1.0.6"+ },+ "require-dev": {+ "friendsofphp/php-cs-fixer": "*",+ "mikey179/vfsstream": "^1.6.0",+ "phpstan/phpstan": "*",+ "phpunit/phpunit": "<10"+ },+ "suggest": {+ "ext-iconv": "For best support/performance",+ "ext-mbstring": "For best support/performance"+ },+ "type": "library",+ "autoload": {+ "psr-4": {+ "ZBateson\\MailMimeParser\\": "src/"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "BSD-2-Clause"+ ],+ "authors": [+ {+ "name": "Zaahid Bateson"+ },+ {+ "name": "Contributors",+ "homepage": "https://github.com/zbateson/mail-mime-parser/graphs/contributors"+ }+ ],+ "description": "MIME email message parser",+ "homepage": "https://mail-mime-parser.org",+ "keywords": [+ "MimeMailParser",+ "email",+ "mail",+ "mailparse",+ "mime",+ "mimeparse",+ "parser",+ "php-imap"+ ],+ "support": {+ "docs": "https://mail-mime-parser.org/#usage-guide",+ "issues": "https://github.com/zbateson/mail-mime-parser/issues",+ "source": "https://github.com/zbateson/mail-mime-parser"+ },+ "funding": [+ {+ "url": "https://github.com/zbateson",+ "type": "github"+ }+ ],+ "time": "2023-02-14T22:58:03+00:00"+ },+ {+ "name": "zbateson/mb-wrapper",+ "version": "1.2.0",+ "source": {+ "type": "git",+ "url": "https://github.com/zbateson/mb-wrapper.git",+ "reference": "faf35dddfacfc5d4d5f9210143eafd7a7fe74334"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/zbateson/mb-wrapper/zipball/faf35dddfacfc5d4d5f9210143eafd7a7fe74334",+ "reference": "faf35dddfacfc5d4d5f9210143eafd7a7fe74334",+ "shasum": ""+ },+ "require": {+ "php": ">=7.1",+ "symfony/polyfill-iconv": "^1.9",+ "symfony/polyfill-mbstring": "^1.9"+ },+ "require-dev": {+ "friendsofphp/php-cs-fixer": "*",+ "phpstan/phpstan": "*",+ "phpunit/phpunit": "<=9.0"+ },+ "suggest": {+ "ext-iconv": "For best support/performance",+ "ext-mbstring": "For best support/performance"+ },+ "type": "library",+ "autoload": {+ "psr-4": {+ "ZBateson\\MbWrapper\\": "src/"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "BSD-2-Clause"+ ],+ "authors": [+ {+ "name": "Zaahid Bateson"+ }+ ],+ "description": "Wrapper for mbstring with fallback to iconv for encoding conversion and string manipulation",+ "keywords": [+ "charset",+ "encoding",+ "http",+ "iconv",+ "mail",+ "mb",+ "mb_convert_encoding",+ "mbstring",+ "mime",+ "multibyte",+ "string"+ ],+ "support": {+ "issues": "https://github.com/zbateson/mb-wrapper/issues",+ "source": "https://github.com/zbateson/mb-wrapper/tree/1.2.0"+ },+ "funding": [+ {+ "url": "https://github.com/zbateson",+ "type": "github"+ }+ ],+ "time": "2023-01-11T23:05:44+00:00"+ },+ {+ "name": "zbateson/stream-decorators",+ "version": "1.1.0",+ "source": {+ "type": "git",+ "url": "https://github.com/zbateson/stream-decorators.git",+ "reference": "7466ff45d249c86b96267a83cdae68365ae1787e"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/zbateson/stream-decorators/zipball/7466ff45d249c86b96267a83cdae68365ae1787e",+ "reference": "7466ff45d249c86b96267a83cdae68365ae1787e",+ "shasum": ""+ },+ "require": {+ "guzzlehttp/psr7": "^1.9 | ^2.0",+ "php": ">=7.1",+ "zbateson/mb-wrapper": "^1.0.0"+ },+ "require-dev": {+ "friendsofphp/php-cs-fixer": "*",+ "phpstan/phpstan": "*",+ "phpunit/phpunit": "<=9.0"+ },+ "type": "library",+ "autoload": {+ "psr-4": {+ "ZBateson\\StreamDecorators\\": "src/"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "BSD-2-Clause"+ ],+ "authors": [+ {+ "name": "Zaahid Bateson"+ }+ ],+ "description": "PHP psr7 stream decorators for mime message part streams",+ "keywords": [+ "base64",+ "charset",+ "decorators",+ "mail",+ "mime",+ "psr7",+ "quoted-printable",+ "stream",+ "uuencode"+ ],+ "support": {+ "issues": "https://github.com/zbateson/stream-decorators/issues",+ "source": "https://github.com/zbateson/stream-decorators/tree/1.1.0"+ },+ "funding": [+ {+ "url": "https://github.com/zbateson",+ "type": "github"+ }+ ],+ "time": "2023-01-11T23:22:44+00:00"}],"packages-dev": [@@ -7394,68 +8296,6 @@],"time": "2023-02-07T11:34:05+00:00"},- {- "name": "spatie/backtrace",- "version": "1.4.0",- "source": {- "type": "git",- "url": "https://github.com/spatie/backtrace.git",- "reference": "ec4dd16476b802dbdc6b4467f84032837e316b8c"- },- "dist": {- "type": "zip",- "url": "https://api.github.com/repos/spatie/backtrace/zipball/ec4dd16476b802dbdc6b4467f84032837e316b8c",- "reference": "ec4dd16476b802dbdc6b4467f84032837e316b8c",- "shasum": ""- },- "require": {- "php": "^7.3|^8.0"- },- "require-dev": {- "ext-json": "*",- "phpunit/phpunit": "^9.3",- "spatie/phpunit-snapshot-assertions": "^4.2",- "symfony/var-dumper": "^5.1"- },- "type": "library",- "autoload": {- "psr-4": {- "Spatie\\Backtrace\\": "src"- }- },- "notification-url": "https://packagist.org/downloads/",- "license": [- "MIT"- ],- "authors": [- {- "name": "Freek Van de Herten",- "email": "[email protected]",- "homepage": "https://spatie.be",- "role": "Developer"- }- ],- "description": "A better backtrace",- "homepage": "https://github.com/spatie/backtrace",- "keywords": [- "Backtrace",- "spatie"- ],- "support": {- "source": "https://github.com/spatie/backtrace/tree/1.4.0"- },- "funding": [- {- "url": "https://github.com/sponsors/spatie",- "type": "github"- },- {- "url": "https://spatie.be/open-source/support-us",- "type": "other"- }- ],- "time": "2023-03-04T08:57:24+00:00"- },{"name": "spatie/flare-client-php","version": "1.3.5",diff --git a/config/ray.php b/config/ray.phpnew file mode 100644index 0000000000..08598c4e8c--- /dev/null+++ b/config/ray.php@@ -0,0 +1,108 @@+<?php++return [+ /*+ * This setting controls whether data should be sent to Ray.+ *+ * By default, `ray()` will only transmit data in non-production environments.+ */+ 'enable' => env('RAY_ENABLED', true),++ /*+ * When enabled, all cache events will automatically be sent to Ray.+ */+ 'send_cache_to_ray' => env('SEND_CACHE_TO_RAY', false),++ /*+ * When enabled, all things passed to `dump` or `dd`+ * will be sent to Ray as well.+ */+ 'send_dumps_to_ray' => env('SEND_DUMPS_TO_RAY', true),++ /*+ * When enabled all job events will automatically be sent to Ray.+ */+ 'send_jobs_to_ray' => env('SEND_JOBS_TO_RAY', false),++ /*+ * When enabled, all things logged to the application log+ * will be sent to Ray as well.+ */+ 'send_log_calls_to_ray' => env('SEND_LOG_CALLS_TO_RAY', true),++ /*+ * When enabled, all queries will automatically be sent to Ray.+ */+ 'send_queries_to_ray' => env('SEND_QUERIES_TO_RAY', false),++ /**+ * When enabled, all duplicate queries will automatically be sent to Ray.+ */+ 'send_duplicate_queries_to_ray' => env('SEND_DUPLICATE_QUERIES_TO_RAY', false),++ /*+ * When enabled, slow queries will automatically be sent to Ray.+ */+ 'send_slow_queries_to_ray' => env('SEND_SLOW_QUERIES_TO_RAY', false),++ /**+ * Queries that are longer than this number of milliseconds will be regarded as slow.+ */+ 'slow_query_threshold_in_ms' => env('RAY_SLOW_QUERY_THRESHOLD_IN_MS', 500),++ /*+ * When enabled, all requests made to this app will automatically be sent to Ray.+ */+ 'send_requests_to_ray' => env('SEND_REQUESTS_TO_RAY', false),++ /**+ * When enabled, all Http Client requests made by this app will be automatically sent to Ray.+ */+ 'send_http_client_requests_to_ray' => env('SEND_HTTP_CLIENT_REQUESTS_TO_RAY', false),++ /*+ * When enabled, all views that are rendered automatically be sent to Ray.+ */+ 'send_views_to_ray' => env('SEND_VIEWS_TO_RAY', false),++ /*+ * When enabled, all exceptions will be automatically sent to Ray.+ */+ 'send_exceptions_to_ray' => env('SEND_EXCEPTIONS_TO_RAY', true),++ /*+ * When enabled, all deprecation notices will be automatically sent to Ray.+ */+ 'send_deprecated_notices_to_ray' => env('SEND_DEPRECATED_NOTICES_TO_RAY', false),++ /*+ * The host used to communicate with the Ray app.+ * When using Docker on Mac or Windows, you can replace localhost with 'host.docker.internal'+ * When using Docker on Linux, you can replace localhost with '172.17.0.1'+ * When using Homestead with the VirtualBox provider, you can replace localhost with '10.0.2.2'+ * When using Homestead with the Parallels provider, you can replace localhost with '10.211.55.2'+ */+ 'host' => env('RAY_HOST', 'host.docker.internal'),++ /*+ * The port number used to communicate with the Ray app.+ */+ 'port' => env('RAY_PORT', 23517),++ /*+ * Absolute base path for your sites or projects in Homestead,+ * Vagrant, Docker, or another remote development server.+ */+ 'remote_path' => env('RAY_REMOTE_PATH', null),++ /*+ * Absolute base path for your sites or projects on your local+ * computer where your IDE or code editor is running on.+ */+ 'local_path' => env('RAY_LOCAL_PATH', null),++ /*+ * When this setting is enabled, the package will not try to format values sent to Ray.+ */+ 'always_send_raw_values' => false,+];diff --git a/coolify_id25519 b/coolify_id25519new file mode 100644index 0000000000..c67d90a641--- /dev/null+++ b/coolify_id25519@@ -0,0 +1,7 @@+-----BEGIN OPENSSH PRIVATE KEY-----+b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW+QyNTUxOQAAACBbhpqHhqv6aI67Mj9abM3DVbmcfYhZAhC7ca4d9UCevAAAAJi/QySHv0Mk+hwAAAAtzc2gtZWQyNTUxOQAAACBbhpqHhqv6aI67Mj9abM3DVbmcfYhZAhC7ca4d9UCevA+AAAECBQw4jg1WRT2IGHMncCiZhURCts2s24HoDS0thHnnRKVuGmoeGq/pojrsyP1pszcNV+uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==+-----END OPENSSH PRIVATE KEY-----diff --git a/database/migrations/2023_03_20_112410_create_activity_log_table.php b/database/migrations/2023_03_20_112410_create_activity_log_table.phpnew file mode 100755index 0000000000..7c05bc8929--- /dev/null+++ b/database/migrations/2023_03_20_112410_create_activity_log_table.php@@ -0,0 +1,27 @@+<?php++use Illuminate\Support\Facades\Schema;+use Illuminate\Database\Schema\Blueprint;+use Illuminate\Database\Migrations\Migration;++class CreateActivityLogTable extends Migration+{+ public function up()+ {+ Schema::connection(config('activitylog.database_connection'))->create(config('activitylog.table_name'), function (Blueprint $table) {+ $table->bigIncrements('id');+ $table->string('log_name')->nullable();+ $table->text('description');+ $table->nullableMorphs('subject', 'subject');+ $table->nullableMorphs('causer', 'causer');+ $table->json('properties')->nullable();+ $table->timestamps();+ $table->index('log_name');+ });+ }++ public function down()+ {+ Schema::connection(config('activitylog.database_connection'))->dropIfExists(config('activitylog.table_name'));+ }+}diff --git a/database/migrations/2023_03_20_112411_add_event_column_to_activity_log_table.php b/database/migrations/2023_03_20_112411_add_event_column_to_activity_log_table.phpnew file mode 100755index 0000000000..7b797fd5e2--- /dev/null+++ b/database/migrations/2023_03_20_112411_add_event_column_to_activity_log_table.php@@ -0,0 +1,22 @@+<?php++use Illuminate\Support\Facades\Schema;+use Illuminate\Database\Schema\Blueprint;+use Illuminate\Database\Migrations\Migration;++class AddEventColumnToActivityLogTable extends Migration+{+ public function up()+ {+ Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) {+ $table->string('event')->nullable()->after('subject_type');+ });+ }++ public function down()+ {+ Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) {+ $table->dropColumn('event');+ });+ }+}diff --git a/database/migrations/2023_03_20_112412_add_batch_uuid_column_to_activity_log_table.php b/database/migrations/2023_03_20_112412_add_batch_uuid_column_to_activity_log_table.phpnew file mode 100755index 0000000000..8f7db66542--- /dev/null+++ b/database/migrations/2023_03_20_112412_add_batch_uuid_column_to_activity_log_table.php@@ -0,0 +1,22 @@+<?php++use Illuminate\Support\Facades\Schema;+use Illuminate\Database\Schema\Blueprint;+use Illuminate\Database\Migrations\Migration;++class AddBatchUuidColumnToActivityLogTable extends Migration+{+ public function up()+ {+ Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) {+ $table->uuid('batch_uuid')->nullable()->after('properties');+ });+ }++ public function down()+ {+ Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) {+ $table->dropColumn('batch_uuid');+ });+ }+}diff --git a/database/migrations/2023_03_20_112810_create_jobs_table.php b/database/migrations/2023_03_20_112810_create_jobs_table.phpnew file mode 100755index 0000000000..6098d9b123--- /dev/null+++ b/database/migrations/2023_03_20_112810_create_jobs_table.php@@ -0,0 +1,32 @@+<?php++use Illuminate\Database\Migrations\Migration;+use Illuminate\Database\Schema\Blueprint;+use Illuminate\Support\Facades\Schema;++return new class extends Migration+{+ /**+ * Run the migrations.+ */+ public function up(): void+ {+ Schema::create('jobs', function (Blueprint $table) {+ $table->bigIncrements('id');+ $table->string('queue')->index();+ $table->longText('payload');+ $table->unsignedTinyInteger('attempts');+ $table->unsignedInteger('reserved_at')->nullable();+ $table->unsignedInteger('available_at');+ $table->unsignedInteger('created_at');+ });+ }++ /**+ * Reverse the migrations.+ */+ public function down(): void+ {+ Schema::dropIfExists('jobs');+ }+};diff --git a/docker-compose.yaml b/docker-compose.yamlindex ae1dc82f8a..9fe23b25f1 100644--- a/docker-compose.yaml+++ b/docker-compose.yaml@@ -3,8 +3,8 @@ services:php:image: coolify:4build:- context: .dockerfile: Dockerfile+ context: ./docker/devports:- "${APP_PORT:-8000}:80"- "${VITE_PORT:-5173}:${VITE_PORT:-5173}"diff --git a/docker/dev/Dockerfile b/docker/dev/Dockerfilenew file mode 100644index 0000000000..ccfda8f890--- /dev/null+++ b/docker/dev/Dockerfile@@ -0,0 +1,20 @@+FROM serversideup/php:8.2-fpm-nginx++ARG NODE_VERSION=18+ARG POSTGRES_VERSION=15++RUN apt-get update \+ && curl -sLS https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - \+ && apt-get install -y nodejs \+ && npm install -g npm++RUN apt-get install -y php-pgsql openssh-client++RUN apt-get -y autoremove \+ && apt-get clean \+ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*++USER root++# S6 Overlay config+COPY --chmod=755 etc/s6-overlay/ /etc/s6-overlay/diff --git a/docker/dev/etc/s6-overlay/s6-rc.d/queue-worker/run b/docker/dev/etc/s6-overlay/s6-rc.d/queue-worker/runnew file mode 100644index 0000000000..23dddd0308--- /dev/null+++ b/docker/dev/etc/s6-overlay/s6-rc.d/queue-worker/run@@ -0,0 +1,2 @@+#!/command/execlineb -P+su webuser -c "php /var/www/html/artisan queue:listen --tries=3"diff --git a/docker/dev/etc/s6-overlay/s6-rc.d/queue-worker/type b/docker/dev/etc/s6-overlay/s6-rc.d/queue-worker/typenew file mode 100644index 0000000000..5883cff0cd--- /dev/null+++ b/docker/dev/etc/s6-overlay/s6-rc.d/queue-worker/type@@ -0,0 +1 @@+longrundiff --git a/docker/dev/etc/s6-overlay/s6-rc.d/user/contents.d/queue-worker b/docker/dev/etc/s6-overlay/s6-rc.d/user/contents.d/queue-workernew file mode 100644index 0000000000..e69de29bb2diff --git a/resources/views/components/button.blade.php b/resources/views/components/button.blade.phpnew file mode 100644index 0000000000..f59d459732--- /dev/null+++ b/resources/views/components/button.blade.php@@ -0,0 +1,3 @@+ <button wire:loading.remove {{ $attributes }} class="btn btn-primary rounded-none btn-xs no-animation"> {{ $slot }} </button>++ <button wire:loading class="btn btn-disabled rounded-none btn-xs no-animation"> {{ $slot }}</button>diff --git a/resources/views/components/layout.blade.php b/resources/views/components/layout.blade.phpnew file mode 100644index 0000000000..f69d56d92f--- /dev/null+++ b/resources/views/components/layout.blade.php@@ -0,0 +1,24 @@+<!DOCTYPE html>+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" data-theme="light" class="h-full">++<head>+ <meta charset="utf-8">+ <meta name="viewport" content="width=device-width, initial-scale=1">+ <title>{{ $title ?? 'Coolify' }}</title>+ <meta name="csrf-token" content="{{ csrf_token() }}">+ @vite(['resources/js/app.js', 'resources/css/app.css'])+ @livewireStyles+</head>++<body class="h-full">+ @auth+ <x-navbar />+ @endauth+ <main class="h-full pt-10 p-4">+ {{ $slot }}+ </main>++ @livewireScripts+</body>++</html>diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.phpnew file mode 100644index 0000000000..8635e6cfc5--- /dev/null+++ b/resources/views/components/navbar.blade.php@@ -0,0 +1,15 @@+<nav class="flex space-x-4 p-2 fixed right-0">+ @env('local')+ <a href="/run-command">Run command</a>+ {{-- <livewire:create-token /> --}}+ <a href="/debug">Debug</a>+ <a href="/debug/logs" target="_blank">Debug Logs</a>+ {{-- <a href="/debug/inertia">Debug(inertia)</a> --}}+ @endenv+ <a href="/">Dashboard</a>+ <a href="/profile">Profile</a>+ <form action="/logout" method="POST">+ @csrf+ <button type="submit">Logout</button>+ </form>+</nav>diff --git a/resources/views/demo.blade.php b/resources/views/demo.blade.phpnew file mode 100644index 0000000000..3247b6d598--- /dev/null+++ b/resources/views/demo.blade.php@@ -0,0 +1,5 @@+<x-layout>++ <livewire:run-command />++</x-layout>diff --git a/resources/views/livewire/run-command.blade.php b/resources/views/livewire/run-command.blade.phpnew file mode 100755index 0000000000..fe24caab3e--- /dev/null+++ b/resources/views/livewire/run-command.blade.php@@ -0,0 +1,44 @@+<div>+ <div>+ <div>+ <label for="command">+ <input class="ring-1" id="command" wire:model="command" type="text"/>+ </label>+ <button class="btn btn-success btn-xs rounded-none" wire:click="runCommand">+ Run command+ <button>+ </div>++ @isset($activity?->id)+ <div>+ Activity: <span>{{ $activity?->id ?? 'waiting' }}</span>+ </div>+ @endisset+ </div>++ <div class="w-full h-10"></div>++ <pre+ style="+ background-color: #FFFFFF;+ width: 1200px;+ height: 600px;+ overflow-y: scroll;+ display: flex;+ flex-direction: column-reverse;+ "+ placeholder="Build output"+ @if($isKeepAliveOn || $manualKeepAlive) wire:poll.750ms="polling" @endif+ >+ {{ data_get($activity, 'description') }}+ </pre>++ <div>+ <input id="manualKeepAlive" name="manualKeepAlive" type="checkbox" wire:model="manualKeepAlive">+ <label for="manualKeepAlive"> Live content </label>+ </div>++ @if($isKeepAliveOn || $manualKeepAlive)+ Polling...+ @endif+</div>diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.phpindex da211600d9..443ef8bae3 100644--- a/resources/views/welcome.blade.php+++ b/resources/views/welcome.blade.php@@ -13,6 +13,10 @@<h1 class="text-3xl font-bold">Hello from Coolify!</h1>++ <p class="mt-4">+ <a href="/demo"> See demo </a>+ </p></body></html>diff --git a/routes/web.php b/routes/web.phpindex d259f33ea8..cb09e09d97 100644--- a/routes/web.php+++ b/routes/web.php@@ -16,3 +16,5 @@ use Illuminate\Support\Facades\Route;Route::get('/', function () {return view('welcome');});++Route::view('/demo', 'demo');