Back to Help | Back to login

DEPLOYMENT

Central Business Platform (CBP)

Access: The CBP platform is available at https://cbp.africacdc.org/staff/apm. You must have a valid account to sign in.
No matching content found. Try different keywords.

Deployment Guide

Quick Setup Commands

1. Install Dependencies

composer install --optimize-autoloader --no-dev
npm install --production
npm run build

2. Environment Setup

cp .env.example .env
php artisan key:generate

3. Database Setup

php artisan migrate --force
php artisan uploads:link

5. Clear Caches

php artisan config:clear
php artisan route:clear
php artisan view:clear
php artisan cache:clear

One-Command Deployment

Use the composer script for complete deployment:

composer run deploy

This will:

  • Clear all caches
  • Create/update uploads symlink
  • Run database migrations

The uploads:link command creates a symbolic link from /opt/homebrew/var/www/staff/uploads to public/uploads, making uploaded files accessible via web.

Manual Command

php artisan uploads:link

Force Recreation

php artisan uploads:link --force

Directory Structure

/opt/homebrew/var/www/staff/uploads/
├── staff/
│   └── signature/     # Staff signature images
├── summernote/        # Rich text editor uploads
└── ...                # Other uploaded documents

Troubleshooting

  • Ensure the web server has permission to create symlinks
  • On Windows, the command uses mklink /J (junction)
  • On Unix-like systems, it uses symlink()

Permission Issues

chmod -R 755 storage/app/uploads
chown -R www-data:www-data storage/app/uploads
ls -la public/uploads
# Should show: lrwxr-xr-x ... public/uploads -> /path/to/storage/app/uploads

Production Considerations

  1. File Permissions: Ensure proper permissions on uploads directory
  2. Storage: Monitor disk space for uploads
  3. Backup: Include uploads directory in backup strategy
  4. Security: Validate file uploads and restrict file types
Help Center Back to login