feat: Prepare Zemailnator for Dokploy deployment
- Add highly optimized Dockerfile with Nginx and PHP-FPM 8.4 - Add docker-compose.yml configured with Redis and MariaDB 10.11 - Implement entrypoint.sh and supervisord.conf for background workers - Refactor legacy IMAP scripts into scheduled Artisan Commands - Secure app by removing old routes with hardcoded basic auth credentials - Configure email attachments to use Laravel Storage instead of insecure public/tmp
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Livewire\Actions;
|
||||
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use App\Models\ZEmail;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use App\Models\ZEmail;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Livewire\Component;
|
||||
|
||||
class AddOn extends Component
|
||||
@@ -31,6 +31,7 @@ class AddOn extends Component
|
||||
if (count($messages['data']) > 0) {
|
||||
return to_route('mailbox');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -48,7 +49,7 @@ class AddOn extends Component
|
||||
$this->faqSchema = [
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'FAQPage',
|
||||
'mainEntity' => collect($this->faqs)->map(fn(array $faq): array => [
|
||||
'mainEntity' => collect($this->faqs)->map(fn (array $faq): array => [
|
||||
'@type' => 'Question',
|
||||
'name' => $faq['title'],
|
||||
'acceptedAnswer' => [
|
||||
@@ -66,7 +67,7 @@ class AddOn extends Component
|
||||
$this->faqSchema = [
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'FAQPage',
|
||||
'mainEntity' => collect($this->faqs)->map(fn(array $faq): array => [
|
||||
'mainEntity' => collect($this->faqs)->map(fn (array $faq): array => [
|
||||
'@type' => 'Question',
|
||||
'name' => $faq['title'],
|
||||
'acceptedAnswer' => [
|
||||
@@ -85,7 +86,7 @@ class AddOn extends Component
|
||||
$this->faqSchema = [
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'FAQPage',
|
||||
'mainEntity' => collect($this->faqs)->map(fn(array $faq): array => [
|
||||
'mainEntity' => collect($this->faqs)->map(fn (array $faq): array => [
|
||||
'@type' => 'Question',
|
||||
'name' => $faq['title'],
|
||||
'acceptedAnswer' => [
|
||||
@@ -103,7 +104,7 @@ class AddOn extends Component
|
||||
$this->faqSchema = [
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'FAQPage',
|
||||
'mainEntity' => collect($this->faqs)->map(fn(array $faq): array => [
|
||||
'mainEntity' => collect($this->faqs)->map(fn (array $faq): array => [
|
||||
'@type' => 'Question',
|
||||
'name' => $faq['title'],
|
||||
'acceptedAnswer' => [
|
||||
@@ -121,7 +122,7 @@ class AddOn extends Component
|
||||
$this->faqSchema = [
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'FAQPage',
|
||||
'mainEntity' => collect($this->faqs)->map(fn(array $faq): array => [
|
||||
'mainEntity' => collect($this->faqs)->map(fn (array $faq): array => [
|
||||
'@type' => 'Question',
|
||||
'name' => $faq['title'],
|
||||
'acceptedAnswer' => [
|
||||
@@ -139,7 +140,7 @@ class AddOn extends Component
|
||||
$this->faqSchema = [
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'FAQPage',
|
||||
'mainEntity' => collect($this->faqs)->map(fn(array $faq): array => [
|
||||
'mainEntity' => collect($this->faqs)->map(fn (array $faq): array => [
|
||||
'@type' => 'Question',
|
||||
'name' => $faq['title'],
|
||||
'acceptedAnswer' => [
|
||||
@@ -157,7 +158,7 @@ class AddOn extends Component
|
||||
$this->faqSchema = [
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'FAQPage',
|
||||
'mainEntity' => collect($this->faqs)->map(fn(array $faq): array => [
|
||||
'mainEntity' => collect($this->faqs)->map(fn (array $faq): array => [
|
||||
'@type' => 'Question',
|
||||
'name' => $faq['title'],
|
||||
'acceptedAnswer' => [
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Livewire\Dashboard;
|
||||
|
||||
use App\Models\Subscription;
|
||||
use App\Models\UsageLog;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -10,7 +11,6 @@ use Illuminate\Support\Facades\Date;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Livewire\Component;
|
||||
use Stripe\StripeClient;
|
||||
use App\Models\Subscription;
|
||||
|
||||
class Dashboard extends Component
|
||||
{
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
namespace App\Livewire\Dashboard;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use App\Models\Ticket;
|
||||
use App\Models\TicketResponse;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Illuminate\Support\Str;
|
||||
use Livewire\Component;
|
||||
|
||||
class Support extends Component
|
||||
@@ -129,9 +129,9 @@ class Support extends Component
|
||||
|
||||
public function updateTicketCounts(): void
|
||||
{
|
||||
$this->open = $this->tickets->filter(fn($ticket): bool => in_array($ticket->status, ['open', 'pending']))->count();
|
||||
$this->open = $this->tickets->filter(fn ($ticket): bool => in_array($ticket->status, ['open', 'pending']))->count();
|
||||
|
||||
$this->closed = $this->tickets->filter(fn($ticket): bool => $ticket->status === 'closed')->count();
|
||||
$this->closed = $this->tickets->filter(fn ($ticket): bool => $ticket->status === 'closed')->count();
|
||||
}
|
||||
|
||||
protected function getClientIp()
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Livewire\Frontend;
|
||||
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use App\Models\ZEmail;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Livewire\Component;
|
||||
|
||||
class Email extends Component
|
||||
|
||||
@@ -40,6 +40,7 @@ class Mailbox extends Component
|
||||
if (! ZEmail::getEmail()) {
|
||||
return to_route('home');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use App\Models\ZEmail;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use App\Models\ZEmail;
|
||||
use Livewire\Component;
|
||||
|
||||
class Home extends Component
|
||||
@@ -18,6 +18,7 @@ class Home extends Component
|
||||
if (count($messages['data']) > 0) {
|
||||
return to_route('mailbox');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user