add default standalonedockernetwork

This commit is contained in:
Andras Bacsai 2023-05-24 14:56:41 +02:00
parent 838d6f1981
commit b07f2c486c
4 changed files with 18 additions and 9 deletions

View File

@ -82,8 +82,6 @@ public function handle()
$pool->purge(url: "$bunny_cdn/$versions"),
]);
echo "All files uploaded & purged...\n";
return;
throw new \Exception("Something went wrong.");
} catch (\Exception $e) {
echo $e->getMessage();
}

View File

@ -10,6 +10,7 @@
use App\Models\InstanceSettings;
use App\Models\PrivateKey;
use App\Models\Server;
use App\Models\StandaloneDocker;
use App\Models\Team;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Storage;
@ -98,5 +99,14 @@ public function run(): void
$server->settings->is_validated = true;
$server->settings->save();
}
if (StandaloneDocker::find(0) == null) {
StandaloneDocker::create([
'id' => 0,
'name' => 'localhost-coolify',
'description' => 'This is the standalone Docker instance that is used to run the Coolify services.',
'network' => 'coolify',
'server_id' => 0,
]);
}
}
}

View File

@ -25,4 +25,5 @@ services:
- coolify
networks:
coolify:
name: coolify
driver: bridge

View File

@ -20,7 +20,7 @@ function help {
compgen -A function | cat -n
}
function sync-bunny {
function sync:bunny {
php artisan sync:bunny --env=secrets
}
@ -36,19 +36,19 @@ function schedule {
bash vendor/bin/spin exec -u webuser coolify php artisan schedule:work
}
function schedule-run {
function schedule:run {
bash vendor/bin/spin exec -u webuser coolify php artisan schedule:run
}
function db-reset {
function db:reset {
bash vendor/bin/spin exec -u webuser coolify php artisan migrate:fresh --seed
}
function mfs {
db-reset
db:reset
}
function db-reset-prod {
function db:reset-prod {
bash vendor/bin/spin exec -u webuser coolify php artisan migrate:fresh --force --seed --seeder=ProductionSeeder ||
php artisan migrate:fresh --force --seed --seeder=ProductionSeeder
}
@ -57,7 +57,7 @@ function coolify {
bash vendor/bin/spin exec -u webuser coolify bash
}
function coolify-root {
function coolify:root {
bash vendor/bin/spin exec coolify bash
}
@ -77,7 +77,7 @@ function db {
bash vendor/bin/spin exec -u webuser coolify php artisan db
}
function build-builder {
function build:builder {
act -W .github/workflows/coolify-builder.yml --secret-file .env.secrets
}
function default {