5.4 KiB
5.4 KiB
Deployment Plan: HRM System on payrollcpp.com (Hostinger Server)
Status: Proposed Plan
Target Server IP:145.79.25.55:65002
SSH Username:u487818195
Target Domain / Web Root:payrollcpp.com(/home/u487818195/domains/payrollcpp.com/public_html)
Application Name:CONSOLIDATED PAPER PRODUCT INC
Application URL:https://payrollcpp.com
Database: MySQLu487818195_payroll/ User:u487818195_payroll
Git Repository:ssh://gitea-qzlf.srv1050180.hstgr.cloud:48594/admin/HRM-System.git
1. Executive Summary & Architecture
This plan establishes the deployment of the HRM application to a new Hostinger hosting account (u487818195 on 145.79.25.55:65002) serving https://payrollcpp.com.
The deployment includes:
- Server Environment & SSH Provisioning: Connect via SSH, inspect directory layout, PHP CLI binary, and permissions.
- Git Repository Setup & Clone: Set up deployment keys / credentials to clone the HRM codebase directly into
payrollcpp.com/public_html. - Environment Configuration (
.env): Configure custom App Name (CONSOLIDATED PAPER PRODUCT INC), URL, MySQL credentials, and application key. - Database Migration & Initialization: Execute database migrations (
php artisan migrate --force) and initial seeding/admin accounts. - Storage Symlink & Asset Delivery: Run
php artisan storage:link, verify pre-compiled Vite production assets (public/build), and configure proper permissions. - Automated Deployment Webhook (
git-pull.php): Deploy the standalone zero-downtimepublic/git-pull.phpwebhook with token authentication for 1-command deployment.
2. Infrastructure & Credentials Specification
| Parameter | Configuration Value |
|---|---|
| Server IP | 145.79.25.55 |
| SSH Port | 65002 |
| SSH User | u487818195 |
| Domain | payrollcpp.com |
| Target Directory | /home/u487818195/domains/payrollcpp.com/public_html |
| Database Host | 127.0.0.1 / 3306 |
| Database Name | u487818195_payroll |
| Database User | u487818195_payroll |
| App Name | CONSOLIDATED PAPER PRODUCT INC |
| App URL | https://payrollcpp.com |
| PHP Version | PHP 8.3 (/opt/alt/php83/usr/bin/lsphp or php) |
3. Phased Implementation Roadmap
Phase 1: SSH Connectivity & Directory Layout Check
- Connect to
145.79.25.55:65002using SSH credentials (u487818195). - Inspect existing directory structure under
/home/u487818195/domains/payrollcpp.com/public_html. - Check PHP CLI version (
php -v,/opt/alt/php83/usr/bin/lsphp -v) and verify installed extensions (pdo_mysql,mbstring,openssl,gd,zip,xml).
Phase 2: Git Repository Cloning & Remote Configuration
- Ensure Git SSH access from the new server to the central Git server (
gitea-qzlf.srv1050180.hstgr.cloud:48594) or initialize tracking. - Clone the latest
mainbranch intopublic_html(or pull into target directory). - Verify
vendor/packages and pre-compiledpublic/build/assets.
Phase 3: Production Environment (.env) Configuration
- Create
/home/u487818195/domains/payrollcpp.com/public_html/.env:APP_NAME="CONSOLIDATED PAPER PRODUCT INC" APP_ENV=production APP_KEY=base64:... APP_DEBUG=false APP_URL=https://payrollcpp.com LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=error DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=u487818195_payroll DB_USERNAME=u487818195_payroll DB_PASSWORD="2>L?QV663GgC" BROADCAST_DRIVER=log CACHE_DRIVER=file FILESYSTEM_DISK=public QUEUE_CONNECTION=sync SESSION_DRIVER=file SESSION_LIFETIME=120 - Generate unique application key if not set (
php artisan key:generate --force).
Phase 4: Database Migrations & Initial Setup
- Test database connectivity from CLI.
- Run full migrations:
php artisan migrate --force - Run initial setup seeders (roles, permissions, admin user if required for initial login).
- Link public storage:
php artisan storage:link
Phase 5: Cache Warming & Optimization
- Clear bootstrap caches and warm up production caches:
php artisan optimize:clear php artisan config:cache php artisan route:cache php artisan view:cache - Verify directory permissions (
storage/andbootstrap/cache/set to775).
Phase 6: Automated Pull Webhook & Verification
- Ensure
public/git-pull.phpis deployed with secure token7f3b89e902a2cdb8b5de9f2e30f14d8a245fca9b. - Test webhook execution:
curl -s "https://payrollcpp.com/git-pull.php?token=7f3b89e902a2cdb8b5de9f2e30f14d8a245fca9b" - Run live HTTP check on
https://payrollcpp.comto verify proper login screen rendering, title display (CONSOLIDATED PAPER PRODUCT INC), and asset loading.
4. Verification Checklist
| Check | Expected Result |
|---|---|
| SSH Connectivity | Successful auth on 145.79.25.55:65002 as u487818195 |
| Database Connection | MySQL tables created in u487818195_payroll without errors |
| Storage Symlink | public/storage points to storage/app/public |
| Web Endpoint | https://payrollcpp.com loads HTTP 200/302 with title "CONSOLIDATED PAPER PRODUCT INC" |
| Webhook Pull | curl to git-pull.php reports successful git reset, cache clear, and OPCache reset |