Skip to content

Commit

Permalink
add default standalonedockernetwork
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed May 24, 2023
1 parent 838d6f1 commit b07f2c4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
2 changes: 0 additions & 2 deletions app/Console/Commands/SyncBunny.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
10 changes: 10 additions & 0 deletions database/seeders/ProductionSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
]);
}
}
}
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ services:
- coolify
networks:
coolify:
name: coolify
driver: bridge
14 changes: 7 additions & 7 deletions scripts/run
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function help {
compgen -A function | cat -n
}

function sync-bunny {
function sync:bunny {
php artisan sync:bunny --env=secrets
}

Expand All @@ -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
}
Expand All @@ -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
}

Expand All @@ -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 {
Expand Down

0 comments on commit b07f2c4

Please sign in to comment.