Minor changes to optimise new installs

This commit is contained in:
Deon George 2023-10-17 23:19:28 +11:00
parent 8ce3ce8164
commit f9d24db9f8
9 changed files with 18 additions and 67 deletions

View File

@ -2,7 +2,8 @@ APP_NAME="Clearing Houz"
APP_ENV=production
APP_KEY=
APP_DEBUG=false
APP_URL=http://localhost
APP_URL=http://clrghouz
APP_TIMEZONE=
LOG_CHANNEL=stack
LOG_LEVEL=info
@ -10,8 +11,8 @@ LOG_LEVEL=info
DB_CONNECTION=pgsql
DB_HOST=postgres
DB_PORT=5432
DB_DATABASE=laravel
DB_USERNAME=laravel
DB_DATABASE=clrghouz
DB_USERNAME=clrghouz
DB_PASSWORD=
#DB_SSLMODE=prefer
#DB_SSLROOTCERT=/var/www/html/config/ssl/ca.crt

View File

@ -2,7 +2,7 @@ APP_NAME="Clearing Houz Testing"
APP_ENV=testing
APP_KEY=base64:FiMSvv4J7jDfy6W/sHrQ9YImuUYaxynYCcXQJwp/6Tc=
APP_DEBUG=true
APP_URL=http://localhost
APP_URL=http://clrghouz
APP_TIMEZONE=Australia/Melbourne
LOG_CHANNEL=stderr

View File

@ -7,7 +7,7 @@ armv7l:build:
script:
- if [ -f init ]; then chmod 500 init; fi
- echo -n ${CI_COMMIT_SHORT_SHA} > VERSION
- rm -rf vendor/ database/schema database/seeders database/factories/*
- rm -rf vendor/ database/schema database/seeders/Test*.php database/factories/*
- docker build -t ${CI_REGISTRY_IMAGE}:${VERSIONARCH} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH}

View File

@ -7,7 +7,7 @@ x86_64:build:
script:
- if [ -f init ]; then chmod 500 init; fi
- echo -n ${CI_COMMIT_SHORT_SHA} > VERSION
- rm -rf vendor/ database/schema database/seeders database/factories/*
- rm -rf vendor/ database/schema database/seeders/Test*.php database/factories/*
- docker build -t ${CI_REGISTRY_IMAGE}:${VERSIONARCH} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH}

View File

@ -1,34 +0,0 @@
<?php
namespace App\Console\Commands;
use Database\Seeders\InitialSetupSeeder;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
class InitialSetup extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'initial:setup';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Initial Setup of DB';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
Artisan::call('db:seed',['class'=>InitialSetupSeeder::class]);
}
}

View File

@ -13,7 +13,7 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
$this->call(InitialSetupSeeder::class);
$this->call(NodeHierarchy::class);
$this->call(InitialSetup::class);
$this->call(TestNodeHierarchy::class);
}
}

View File

@ -8,7 +8,7 @@ use Illuminate\Support\Facades\DB;
use App\Models\{Domain,Software,System,Zone};
class InitialSetupSeeder extends Seeder
class InitialSetup extends Seeder
{
/**
* Run the database seeds.
@ -65,28 +65,12 @@ class InitialSetupSeeder extends Seeder
]);
DB::table('users')->insert([
'name'=>'Deon George',
'email'=>'deon@leenooks.net',
'name'=>'System Admin',
'email'=>'admin@clrghouz',
'email_verified_at'=>Carbon::now(),
'admin'=>TRUE,
'active'=>TRUE,
'password'=>'$2y$10$bJQDLfxnKrh6o5Sa02MZOukXcLTNQiByXSTJ7fTr.kHMpV2wxbG6.',
]);
DB::table('echoareas')->insert([
'name'=>'-BAD_AREA',
'description'=>'Inbound invalid echomail',
'active'=>TRUE,
'show'=>TRUE,
'domain_id'=>$do->id,
]);
DB::table('fileareas')->insert([
'name'=>'-BAD_AREA',
'description'=>'Inbound invalid files',
'active'=>TRUE,
'show'=>TRUE,
'domain_id'=>$do->id,
]);
}
}

View File

@ -8,7 +8,7 @@ use Illuminate\Support\Facades\DB;
use App\Models\{Address,Domain,System,Zone};
class NodeHierarchy extends Seeder
class TestNodeHierarchy extends Seeder
{
public const DEBUG=TRUE;

View File

@ -26,7 +26,7 @@ class RoutingTest extends TestCase
*/
public function test_zc()
{
//$this->seed(NodeHierarchy::class);
//$this->seed(TestNodeHierarchy::class);
$nodes = $this->zone();
$this->assertEquals(52,$nodes->count());
@ -100,7 +100,7 @@ class RoutingTest extends TestCase
*/
public function test_rc()
{
//$this->seed(NodeHierarchy::class);
//$this->seed(TestNodeHierarchy::class);
// Pick ZC without any session info - we have 0 children
$ao = Address::findFTN('100:1/0@domain-a');
@ -147,7 +147,7 @@ class RoutingTest extends TestCase
*/
public function test_nc()
{
//$this->seed(NodeHierarchy::class);
//$this->seed(TestNodeHierarchy::class);
// Pick a HC without any session info - we have 0 children
$ao = Address::findFTN('100:20/0@domain-a');
@ -181,7 +181,7 @@ class RoutingTest extends TestCase
*/
public function test_hc()
{
//$this->seed(NodeHierarchy::class);
//$this->seed(TestNodeHierarchy::class);
// Pick a HC without any session info - we have 0 children
$ao = Address::findFTN('100:20/2000@domain-a');
@ -202,7 +202,7 @@ class RoutingTest extends TestCase
public function test_node()
{
//$this->seed(NodeHierarchy::class);
//$this->seed(TestNodeHierarchy::class);
// Node with session details still doesnt have any children
$ao = Address::findFTN('100:20/2001@domain-a');