Small updates for the docker image
Some checks failed
linter / quality (push) Successful in 6m32s
tests / ci (push) Failing after 11m22s

This commit is contained in:
Javier Feliz 2025-08-02 20:21:17 -04:00
parent de8277a303
commit 23cdba7d8a
6 changed files with 23 additions and 22 deletions

View File

@ -4,8 +4,8 @@ COPY ./hook.sh /app/hook.sh
# Get the app in there
COPY . /app
ENV ENABLE_QUEUE_WORKER=true
ENV ENABLE_SCHEDULER=true
# ENV ENABLE_QUEUE_WORKER=true
# ENV ENABLE_SCHEDULER=true
VOLUME [ "/app/storage/oauth" ]
VOLUME [ "/app/database" ]

View File

@ -17,6 +17,7 @@ setup: ## Install Laravel Octane with FrankenPHP
# Docker build targets
build: ## Build the Docker image
@echo "Building Docker image: $(IMAGE_NAME):$(VERSION)"
npm run build
docker build -t $(IMAGE_NAME):$(VERSION) .
@echo "✅ Image built successfully"
@ -35,7 +36,7 @@ run: ## Run the container (production-like)
-p $(PORT):8000 \
-e APP_NAME="AuthentiKate" \
-e APP_ENV=production \
-e APP_DEBUG=false \
-e APP_DEBUG=true \
-e APP_KEY=base64:$$(openssl rand -base64 32) \
-e APP_URL=http://localhost:$(PORT) \
-e DB_CONNECTION=sqlite \

View File

@ -34,7 +34,7 @@ class CreateInitialAdmin extends Command
// Check if admin users already exist (unless forced)
if (!$this->option('force') && User::where('is_admin', true)->exists()) {
$this->error('Admin users already exist! Use --force to create anyway.');
return 1;
return Command::SUCCESS;
}
// Get user input for email and name
@ -44,13 +44,13 @@ class CreateInitialAdmin extends Command
// Validate email format
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$this->error('Invalid email address format.');
return 1;
return Command::SUCCESS;
}
// Check if email already exists
if (User::where('email', $email)->exists()) {
$this->error("A user with email '{$email}' already exists.");
return 1;
return Command::SUCCESS;
}
// Generate a random password
@ -68,16 +68,16 @@ class CreateInitialAdmin extends Command
// Display success message with login credentials
$this->info('✅ Initial admin user created successfully!');
$this->newLine();
$this->line('🔐 <options=bold>Login Credentials:</options=bold>');
$this->line("📧 Email: <fg=yellow>{$email}</>");
$this->line("🔑 Password: <fg=yellow>{$password}</>");
$this->newLine();
$this->warn('⚠️ Please log in and change your password immediately!');
$this->info('💡 You can access the admin panel to manage users and applications.');
return 0;
return Command::SUCCESS;
}
/**
@ -91,22 +91,22 @@ class CreateInitialAdmin extends Command
$uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$numbers = '0123456789';
$symbols = '!@#$%^&*()_+-=[]{}|;:,.<>?';
$password = '';
// Ensure at least one character from each category
$password .= $lowercase[random_int(0, strlen($lowercase) - 1)];
$password .= $uppercase[random_int(0, strlen($uppercase) - 1)];
$password .= $numbers[random_int(0, strlen($numbers) - 1)];
$password .= $symbols[random_int(0, strlen($symbols) - 1)];
// Fill the rest with random characters from all categories
$allChars = $lowercase . $uppercase . $numbers . $symbols;
for ($i = 4; $i < $length; $i++) {
$password .= $allChars[random_int(0, strlen($allChars) - 1)];
}
// Shuffle the password to randomize the order
return str_shuffle($password);
}
}
}

View File

@ -1,6 +1,3 @@
{{--
fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" {{ $attributes }}
--}}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" {{ $attributes }} zoomAndPan="magnify"
viewBox="0 0 174.75 204" preserveAspectRatio="xMidYMid" version="1.2" id="svg19"

Before

Width:  |  Height:  |  Size: 414 KiB

After

Width:  |  Height:  |  Size: 414 KiB

View File

@ -1,6 +1,7 @@
<div class="flex aspect-square size-10 items-center justify-center rounded-md dark:bg-white text-accent-foreground">
{{-- <div
class="flex aspect-square size-10 items-center justify-center rounded-md dark:bg-white text-accent-foreground">
<x-app-logo-icon class="size-10 fill-current text-white dark:text-black" />
</div>
</div> --}}
<div class="ms-1 grid flex-1 text-start text-sm">
<span class="mb-0.5 truncate leading-tight font-semibold">{{ config('app.name') }}</span>
</div>

View File

@ -14,7 +14,8 @@
class="absolute inset-0 bg-neutral-900"></div>
<a href="{{ route('home') }}" class="relative z-20 flex items-center text-lg font-medium" wire:navigate>
<span class="flex h-10 w-10 items-center justify-center rounded-md">
<x-app-logo-icon class="me-2 h-7 fill-current text-white" />
{{--
<x-app-logo-icon class="me-2 h-7 fill-current text-white" /> --}}
</span>
{{ config('app.name', 'Laravel') }}
</a>
@ -38,7 +39,8 @@
<a href="{{ route('home') }}" class="z-20 flex flex-col items-center gap-2 font-medium lg:hidden"
wire:navigate>
<span class="flex h-9 w-9 items-center justify-center rounded-md">
<x-app-logo-icon class="size-9 fill-current text-black dark:text-white" />
{{--
<x-app-logo-icon class="size-9 fill-current text-black dark:text-white" /> --}}
</span>
<span class="sr-only">{{ config('app.name', 'Laravel') }}</span>