This commit is contained in:
Andras Bacsai 2023-05-25 13:19:39 +02:00
parent 2834d7f342
commit 89ba10ab4e
27 changed files with 34 additions and 36 deletions

View File

@ -60,7 +60,7 @@ public function handle()
];
return PendingRequest::withHeaders($headers)->post('https://api.bunny.net/purge', [
"urls" => [$url],
]);
])->throw();
});
try {
Http::pool(fn (Pool $pool) => [
@ -72,15 +72,13 @@ public function handle()
$pool->storage(file: "$parent_dir/scripts/$docker_install_script")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$docker_install_script"),
$pool->storage(file: "$parent_dir/$versions")->put("/$bunny_cdn_storage_name/$versions"),
]);
Http::pool(fn (Pool $pool) => [
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$compose_file"),
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$compose_file_prod"),
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$production_env"),
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$upgrade_script"),
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$install_script"),
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$docker_install_script"),
$pool->purge(url: "$bunny_cdn/$versions"),
]);
Http::withHeaders([
'AccessKey' => env('BUNNY_API_KEY'),
'Accept' => 'application/json',
])->get('https://api.bunny.net/purge', [
"url" => "$bunny_cdn/$bunny_cdn_path/*",
"async" => false
])->throw();
echo "All files uploaded & purged...\n";
} catch (\Exception $e) {
echo $e->getMessage();

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('uuid')->unique();
$table->boolean('is_root_user')->default(false);
$table->string('name')->default('Your Name Here');

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('personal_access_tokens', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->morphs('tokenable');
$table->string('name');
$table->string('token', 64)->unique();

View File

@ -9,7 +9,7 @@ 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->id()->primary();
$table->string('log_name')->nullable();
$table->text('description');
$table->nullableMorphs('subject', 'subject');

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('teams', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('uuid')->unique();
$table->string('name');
$table->boolean('personal_team')->default(false);

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('team_user', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->foreignId('team_id');
$table->foreignId('user_id');
$table->string('role')->nullable();

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('instance_settings', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('fqdn')->nullable();
$table->string('wildcard_domain')->nullable();
$table->string('redirect_url')->nullable();

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('servers', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('uuid')->unique();
$table->string('name');
$table->string('description')->nullable();

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('server_settings', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('uuid')->unique();
$table->boolean('is_part_of_swarm')->default(false);

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('private_keys', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('uuid')->unique();
$table->string('name');
$table->string('description')->nullable();

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('projects', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('uuid')->unique();
$table->string('name');
$table->string('description')->nullable();

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('project_settings', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('uuid')->unique();
$table->string('wildcard_domain')->nullable();

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('environments', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('name');
$table->foreignId('project_id');
$table->timestamps();

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('applications', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->integer('repository_project_id')->nullable();
$table->string('uuid')->unique();
$table->string('name');

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('application_settings', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->boolean('is_static')->default(false);
$table->boolean('is_git_submodules_allowed')->default(true);
$table->boolean('is_git_lfs_allowed')->default(true);

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('databases', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('uuid')->unique();
$table->string('name');

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('services', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('uuid')->unique();
$table->string('name');

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('standalone_dockers', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('name');
$table->string('uuid')->unique();
$table->string('network');

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('swarm_dockers', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('name');
$table->string('uuid')->unique();

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('kubernetes', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('uuid')->unique();
$table->timestamps();

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('gits', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->enum('type', ['github', 'gitlab', 'bitbucket', 'custom']);
$table->string('api_url');

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('github_apps', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('uuid')->unique();
$table->string('name');

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('gitlab_apps', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('uuid')->unique();
$table->string('name');

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('local_persistent_volumes', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('uuid')->unique();
$table->string('name');
$table->string('mount_path');

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('environment_variables', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('key');
$table->string('value')->nullable();

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('failed_jobs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('uuid')->unique();
$table->text('connection');
$table->text('queue');

View File

@ -12,7 +12,7 @@
public function up(): void
{
Schema::create('application_deployment_queues', function (Blueprint $table) {
$table->bigIncrements('id');
$table->id()->primary();
$table->string('application_id');
$table->integer('pull_request_id')->default(0);
$table->schemalessAttributes('metadata');