From fa570b0ce38ab6f4512e184f6d40feba12462704 Mon Sep 17 00:00:00 2001 From: Javier Feliz Date: Mon, 4 Aug 2025 19:00:29 -0400 Subject: [PATCH] Update makefile and some commands --- Makefile | 7 +++++++ app/Console/Commands/GenerateKeys.php | 2 +- database/seeders/DatabaseSeeder.php | 4 ++-- hook.sh | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 345a709..a23227a 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,15 @@ TEST_CONTAINER_NAME = authentikate-test # Make sure to get set up with octane and frankenPHP # since that's what the base docker image expects setup: ## Install Laravel Octane with FrankenPHP + composer install + npm install composer require laravel/octane + php artisan key:generate php artisan octane:install --server=frankenphp + php artisan migrate:fresh + php artisan app:generate-keys + php artisan authentikate:create-admin --email="admin@admin.com" --name="Admin" + php artisan db:seed # Docker build targets build: ## Build the Docker image diff --git a/app/Console/Commands/GenerateKeys.php b/app/Console/Commands/GenerateKeys.php index 09e96ea..86bc147 100644 --- a/app/Console/Commands/GenerateKeys.php +++ b/app/Console/Commands/GenerateKeys.php @@ -36,7 +36,7 @@ class GenerateKeys extends Command if (file_exists($privatePath) || file_exists($publicPath)) { $this->warn('Keys already exist. Aborting.'); - return 1; + Command::SUCCESS; } $this->info("Generating RSA key pair..."); diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 738f52b..909738d 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -21,8 +21,8 @@ class DatabaseSeeder extends Seeder // 'password' => Hash::make('password') // ]); - // // Create 8 sample applications - // Application::factory(8)->create(); + // Create 8 sample applications + Application::factory(8)->create(); // Create authentication tokens for testing $this->call(AuthenticationTokenSeeder::class); diff --git a/hook.sh b/hook.sh index 70d4676..d159c19 100644 --- a/hook.sh +++ b/hook.sh @@ -1,2 +1,2 @@ php /app/artisan app:generate-keys -php /app/artisan authentikate:create-admin \ No newline at end of file +php /app/artisan authentikate:create-admin --email="admin@admin.com" --name="Admin" \ No newline at end of file