Minor changes to optimise new installs
This commit is contained in:
parent
8ce3ce8164
commit
f9d24db9f8
@ -2,7 +2,8 @@ APP_NAME="Clearing Houz"
|
|||||||
APP_ENV=production
|
APP_ENV=production
|
||||||
APP_KEY=
|
APP_KEY=
|
||||||
APP_DEBUG=false
|
APP_DEBUG=false
|
||||||
APP_URL=http://localhost
|
APP_URL=http://clrghouz
|
||||||
|
APP_TIMEZONE=
|
||||||
|
|
||||||
LOG_CHANNEL=stack
|
LOG_CHANNEL=stack
|
||||||
LOG_LEVEL=info
|
LOG_LEVEL=info
|
||||||
@ -10,8 +11,8 @@ LOG_LEVEL=info
|
|||||||
DB_CONNECTION=pgsql
|
DB_CONNECTION=pgsql
|
||||||
DB_HOST=postgres
|
DB_HOST=postgres
|
||||||
DB_PORT=5432
|
DB_PORT=5432
|
||||||
DB_DATABASE=laravel
|
DB_DATABASE=clrghouz
|
||||||
DB_USERNAME=laravel
|
DB_USERNAME=clrghouz
|
||||||
DB_PASSWORD=
|
DB_PASSWORD=
|
||||||
#DB_SSLMODE=prefer
|
#DB_SSLMODE=prefer
|
||||||
#DB_SSLROOTCERT=/var/www/html/config/ssl/ca.crt
|
#DB_SSLROOTCERT=/var/www/html/config/ssl/ca.crt
|
||||||
|
@ -2,7 +2,7 @@ APP_NAME="Clearing Houz Testing"
|
|||||||
APP_ENV=testing
|
APP_ENV=testing
|
||||||
APP_KEY=base64:FiMSvv4J7jDfy6W/sHrQ9YImuUYaxynYCcXQJwp/6Tc=
|
APP_KEY=base64:FiMSvv4J7jDfy6W/sHrQ9YImuUYaxynYCcXQJwp/6Tc=
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
APP_URL=http://localhost
|
APP_URL=http://clrghouz
|
||||||
APP_TIMEZONE=Australia/Melbourne
|
APP_TIMEZONE=Australia/Melbourne
|
||||||
|
|
||||||
LOG_CHANNEL=stderr
|
LOG_CHANNEL=stderr
|
||||||
|
@ -7,7 +7,7 @@ armv7l:build:
|
|||||||
script:
|
script:
|
||||||
- if [ -f init ]; then chmod 500 init; fi
|
- if [ -f init ]; then chmod 500 init; fi
|
||||||
- echo -n ${CI_COMMIT_SHORT_SHA} > VERSION
|
- 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 build -t ${CI_REGISTRY_IMAGE}:${VERSIONARCH} .
|
||||||
- docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH}
|
- docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ x86_64:build:
|
|||||||
script:
|
script:
|
||||||
- if [ -f init ]; then chmod 500 init; fi
|
- if [ -f init ]; then chmod 500 init; fi
|
||||||
- echo -n ${CI_COMMIT_SHORT_SHA} > VERSION
|
- 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 build -t ${CI_REGISTRY_IMAGE}:${VERSIONARCH} .
|
||||||
- docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH}
|
- docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH}
|
||||||
|
|
||||||
|
@ -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]);
|
|
||||||
}
|
|
||||||
}
|
|
@ -13,7 +13,7 @@ class DatabaseSeeder extends Seeder
|
|||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
$this->call(InitialSetupSeeder::class);
|
$this->call(InitialSetup::class);
|
||||||
$this->call(NodeHierarchy::class);
|
$this->call(TestNodeHierarchy::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ use Illuminate\Support\Facades\DB;
|
|||||||
|
|
||||||
use App\Models\{Domain,Software,System,Zone};
|
use App\Models\{Domain,Software,System,Zone};
|
||||||
|
|
||||||
class InitialSetupSeeder extends Seeder
|
class InitialSetup extends Seeder
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Run the database seeds.
|
* Run the database seeds.
|
||||||
@ -65,28 +65,12 @@ class InitialSetupSeeder extends Seeder
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
DB::table('users')->insert([
|
DB::table('users')->insert([
|
||||||
'name'=>'Deon George',
|
'name'=>'System Admin',
|
||||||
'email'=>'deon@leenooks.net',
|
'email'=>'admin@clrghouz',
|
||||||
'email_verified_at'=>Carbon::now(),
|
'email_verified_at'=>Carbon::now(),
|
||||||
'admin'=>TRUE,
|
'admin'=>TRUE,
|
||||||
'active'=>TRUE,
|
'active'=>TRUE,
|
||||||
'password'=>'$2y$10$bJQDLfxnKrh6o5Sa02MZOukXcLTNQiByXSTJ7fTr.kHMpV2wxbG6.',
|
'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,
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,7 +8,7 @@ use Illuminate\Support\Facades\DB;
|
|||||||
|
|
||||||
use App\Models\{Address,Domain,System,Zone};
|
use App\Models\{Address,Domain,System,Zone};
|
||||||
|
|
||||||
class NodeHierarchy extends Seeder
|
class TestNodeHierarchy extends Seeder
|
||||||
{
|
{
|
||||||
public const DEBUG=TRUE;
|
public const DEBUG=TRUE;
|
||||||
|
|
@ -26,7 +26,7 @@ class RoutingTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function test_zc()
|
public function test_zc()
|
||||||
{
|
{
|
||||||
//$this->seed(NodeHierarchy::class);
|
//$this->seed(TestNodeHierarchy::class);
|
||||||
|
|
||||||
$nodes = $this->zone();
|
$nodes = $this->zone();
|
||||||
$this->assertEquals(52,$nodes->count());
|
$this->assertEquals(52,$nodes->count());
|
||||||
@ -100,7 +100,7 @@ class RoutingTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function test_rc()
|
public function test_rc()
|
||||||
{
|
{
|
||||||
//$this->seed(NodeHierarchy::class);
|
//$this->seed(TestNodeHierarchy::class);
|
||||||
|
|
||||||
// Pick ZC without any session info - we have 0 children
|
// Pick ZC without any session info - we have 0 children
|
||||||
$ao = Address::findFTN('100:1/0@domain-a');
|
$ao = Address::findFTN('100:1/0@domain-a');
|
||||||
@ -147,7 +147,7 @@ class RoutingTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function test_nc()
|
public function test_nc()
|
||||||
{
|
{
|
||||||
//$this->seed(NodeHierarchy::class);
|
//$this->seed(TestNodeHierarchy::class);
|
||||||
|
|
||||||
// Pick a HC without any session info - we have 0 children
|
// Pick a HC without any session info - we have 0 children
|
||||||
$ao = Address::findFTN('100:20/0@domain-a');
|
$ao = Address::findFTN('100:20/0@domain-a');
|
||||||
@ -181,7 +181,7 @@ class RoutingTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function test_hc()
|
public function test_hc()
|
||||||
{
|
{
|
||||||
//$this->seed(NodeHierarchy::class);
|
//$this->seed(TestNodeHierarchy::class);
|
||||||
|
|
||||||
// Pick a HC without any session info - we have 0 children
|
// Pick a HC without any session info - we have 0 children
|
||||||
$ao = Address::findFTN('100:20/2000@domain-a');
|
$ao = Address::findFTN('100:20/2000@domain-a');
|
||||||
@ -202,7 +202,7 @@ class RoutingTest extends TestCase
|
|||||||
|
|
||||||
public function test_node()
|
public function test_node()
|
||||||
{
|
{
|
||||||
//$this->seed(NodeHierarchy::class);
|
//$this->seed(TestNodeHierarchy::class);
|
||||||
|
|
||||||
// Node with session details still doesnt have any children
|
// Node with session details still doesnt have any children
|
||||||
$ao = Address::findFTN('100:20/2001@domain-a');
|
$ao = Address::findFTN('100:20/2001@domain-a');
|
||||||
|
Loading…
Reference in New Issue
Block a user