I will take you through the thought process and give you a simple diagram of my deployment workflow of version 2 of this web application.
We begin with Local Development with Linux( i use Arch by the way) and Code OSS (we love to support open source), code changes through Laravel, Blade and the lovely Tailwind CSS.
Since my web application infrastructure lives outside of the document root of cPanel (the hosting provider does not allow that change), I have to run an npm build for my assets.
After we push to GitHub, in production server(cPanel), I have created a deploy script to simplify the following: composer optimisation, ssh key, cache clearing and asset availability.
Then user sees updates from the frontend.
Developer
│
│
VS Code + Git
│
│
Git Commit / Push (GitHub)
│
▼
┌────────────────────────┐
│ GitHub Repo │
└────────────────────────┘
│
│ git pull
▼
┌──────────────────────────────────────────────────────────────────────────────┐
│ Production Server (Afrihost) │
│ │
│ ┌────────────────────────────────────────────────────────────────────────┐ │
│ │ Laravel 12 Application │ │
│ │ │ │
│ │ app/ routes/ resources/ │ │
│ │ config/ storage/ public/ │ │
│ │ bootstrap/ vendor/ artisan │ │
│ └────────────────────────────────────────────────────────────────────────┘ │
│ │
│ │ │ │
│ │ │ │
│ ▼ ▼ │
│ PHP 8.x Runtime Composer Autoloader │
│ │ │ │
│ └──────────────────┬───────────────┘ │
│ ▼ │
│ Laravel Framework │
│ │ │
│ ┌────────────────────────┼────────────────────────┐ │
│ ▼ ▼ ▼ │
│ Filament Admin MySQL Database Storage/Public │
│ (CMS Content) (Articles, Projects, (Images, Uploads) │
│ Technologies, etc.) │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
│
│
▼
Apache / Nginx
│
▼
Internet Users
│
▼
leonndaba.co.za