forked from pelican-dev/panel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/AutoDeploy
- Loading branch information
Showing
150 changed files
with
716 additions
and
343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,7 @@ | ||
APP_ENV=production | ||
APP_DEBUG=false | ||
APP_KEY= | ||
APP_TIMEZONE=UTC | ||
APP_URL=http://panel.test | ||
APP_LOCALE=en | ||
APP_INSTALLED=false | ||
|
||
LOG_CHANNEL=daily | ||
LOG_STACK=single | ||
LOG_DEPRECATIONS_CHANNEL=null | ||
LOG_LEVEL=debug | ||
|
||
DB_CONNECTION=sqlite | ||
|
||
CACHE_STORE=file | ||
QUEUE_CONNECTION=database | ||
SESSION_DRIVER=file | ||
|
||
MAIL_MAILER=log | ||
MAIL_HOST=smtp.example.com | ||
MAIL_PORT=25 | ||
MAIL_USERNAME= | ||
MAIL_PASSWORD= | ||
MAIL_ENCRYPTION=tls | ||
MAIL_FROM_ADDRESS=[email protected] | ||
MAIL_FROM_NAME="Pelican Admin" | ||
# Set this to your domain to prevent it defaulting to 'localhost', causing mail servers such as Gmail to reject your mail | ||
# MAIL_EHLO_DOMAIN=panel.example.com | ||
|
||
SESSION_ENCRYPT=false | ||
SESSION_PATH=/ | ||
SESSION_DOMAIN=null | ||
SESSION_COOKIE=pelican_session | ||
APP_TIMEZONE=UTC | ||
APP_LOCALE=en |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,8 @@ name: Tests | |
on: | ||
push: | ||
branches: | ||
- '**' | ||
- main | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
mysql: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
admin off | ||
email {$ADMIN_EMAIL} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands\Egg; | ||
|
||
use App\Models\Egg; | ||
use App\Services\Eggs\Sharing\EggExporterService; | ||
use Exception; | ||
use Illuminate\Console\Command; | ||
|
||
class CheckEggUpdatesCommand extends Command | ||
{ | ||
protected $signature = 'p:egg:check-updates'; | ||
|
||
public function handle(EggExporterService $exporterService): void | ||
{ | ||
$eggs = Egg::all(); | ||
foreach ($eggs as $egg) { | ||
try { | ||
if (is_null($egg->update_url)) { | ||
$this->comment("{$egg->name}: Skipping (no update url set)"); | ||
|
||
continue; | ||
} | ||
|
||
$currentJson = json_decode($exporterService->handle($egg->id)); | ||
unset($currentJson->exported_at); | ||
|
||
$updatedJson = json_decode(file_get_contents($egg->update_url)); | ||
unset($updatedJson->exported_at); | ||
|
||
if (md5(json_encode($currentJson)) === md5(json_encode($updatedJson))) { | ||
$this->info("{$egg->name}: Up-to-date"); | ||
cache()->put("eggs.{$egg->uuid}.update", false, now()->addHour()); | ||
} else { | ||
$this->warn("{$egg->name}: Found update"); | ||
cache()->put("eggs.{$egg->uuid}.update", true, now()->addHour()); | ||
} | ||
} catch (Exception $exception) { | ||
$this->error("{$egg->name}: Error ({$exception->getMessage()})"); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.