This commit is contained in:
Andras Bacsai
2023-06-16 11:01:27 +02:00
parent 2b8467e6a1
commit 2c3ddfd363
14 changed files with 35 additions and 18 deletions

View File

@@ -16,7 +16,7 @@ class UpdateCoolify
try {
ray('Running InstanceAutoUpdateJob');
$localhost_name = 'localhost';
if (config('app.env') === 'local') {
if (isDev()) {
$localhost_name = 'testing-local-docker-container';
}
$this->server = Server::where('name', $localhost_name)->firstOrFail();
@@ -48,7 +48,7 @@ class UpdateCoolify
}
private function update()
{
if (config('app.env') === 'local') {
if (isDev()) {
ray('Running update on local docker container');
remote_process([
"sleep 10"

View File

@@ -12,7 +12,7 @@ class Kernel extends ConsoleKernel
{
protected function schedule(Schedule $schedule): void
{
if (config('app.env') === 'local') {
if (isDev()) {
$schedule->command('horizon:snapshot')->everyMinute();
// $schedule->job(new InstanceDockerCleanupJob)->everyMinute();
// $schedule->job(new InstanceAutoUpdateJob(true))->everyMinute();

View File

@@ -47,7 +47,7 @@ class Handler extends ExceptionHandler
{
$this->reportable(function (Throwable $e) {
$this->settings = InstanceSettings::get();
if ($this->settings->do_not_track || config('app.env') === 'local') {
if ($this->settings->do_not_track || isDev()) {
return;
}
Integration::captureUnhandledException($e);

View File

@@ -50,7 +50,7 @@ class GithubPrivateRepositoryDeployKey extends Component
];
public function mount()
{
if (config('app.env') === 'local') {
if (isDev()) {
$this->repository_url = 'https://github.com/coollabsio/coolify-examples';
}
$this->parameters = getRouteParameters();

View File

@@ -39,7 +39,7 @@ class PublicGitRepository extends Component
];
public function mount()
{
if (config('app.env') === 'local') {
if (isDev()) {
$this->repository_url = 'https://github.com/coollabsio/coolify-examples';
$this->port = 3000;
}

View File

@@ -14,7 +14,7 @@ class InviteLink extends Component
public string $role = 'member';
public function mount()
{
$this->email = config('app.env') === 'local' ? 'test3@example.com' : '';
$this->email = isDev() ? 'test3@example.com' : '';
}
public function viaEmail()
{

View File

@@ -16,7 +16,7 @@ class Upgrade extends Component
$latestVersion = get_latest_version_of_coolify();
$currentVersion = config('version');
version_compare($currentVersion, $latestVersion, '<') ? $this->isUpgradeAvailable = true : $this->isUpgradeAvailable = false;
if (config('app.env') === 'local') {
if (isDev()) {
$this->isUpgradeAvailable = true;
}
}