Server requirements
| Requirement | Minimum version / notes |
|---|---|
| PHP | 8.2+ with pdo, mbstring, tokenizer, xml, ctype, json, bcmath, fileinfo extensions |
| Composer | 2.x |
| Node.js | 18+ (required for npm run build and Puppeteer) |
| npm | 9+ |
| Web server | Apache 2.4+ or Nginx 1.18+ |
| Database | SQLite, MySQL 8+, or PostgreSQL 14+ |
Deployment steps
Clone the repository
Clone the project to your server’s web root or a dedicated application directory:
Install PHP dependencies
Install production PHP dependencies only — development tools (Pint, Pail, Sail, PHPUnit) are excluded:
Configure environment variables
Copy the example file and edit it for production:At minimum, update the following values:
Generate the application key
APP_KEY into your .env file. Sessions and encrypted values depend on this key — keep it secret and do not rotate it without planning a migration of existing sessions.Run database migrations
Apply all migrations to the production database. The
--force flag is required when APP_ENV=production:Build front-end assets
Install Node dependencies and compile all CSS and JavaScript for production:Vite outputs compiled assets to the
public/build/ directory. The resources/ source files are not served directly.Set file permissions
The web server process must be able to write to Replace
storage/ and bootstrap/cache/:www-data with the user your web server runs as (e.g., nginx, apache, or caddy).Copy datos.xlsx to public/
MediPro requires a
datos.xlsx spreadsheet in the public/ directory for aluminium profile name lookup. This file is not committed to the repository and must be placed manually:datos.xlsx is not included in the repository (it is gitignored or otherwise not committed). You must obtain this file separately and place it in public/ before the configurator can look up profile names. The application will fail to resolve profile data without it.Web server configuration
Nginx configuration
A minimal Nginx server block for MediPro:Apache configuration
Enablemod_rewrite and create a virtual host pointing to public/:
public/.htaccess file that handles URL rewriting for Apache.
Production optimisations
After deploying, run the Artisan cache commands to pre-compile configuration, routes, and views:Once
config:cache has been run, changes to .env have no effect until you run php artisan config:clear or config:cache again. Always re-run config:cache after updating environment variables.Storage link
If your application writes user-uploaded files tostorage/app/public/ and serves them through the public disk, create the symbolic link:
public/storage → storage/app/public.
Queue worker
MediPro uses the database queue driver (QUEUE_CONNECTION=database). Run a queue worker as a long-lived background process to process jobs:
PDF generation (Browsershot)
MediPro usesspatie/browsershot for PDF generation. Browsershot requires Node.js and Puppeteer to be installed on the server:
Deployment checklist
Environment
Environment
-
APP_ENV=production -
APP_DEBUG=false -
APP_KEYis set and non-empty -
APP_URLmatches the public domain - Database credentials are correct
Files and permissions
Files and permissions
-
storage/is writable by the web server user -
bootstrap/cache/is writable by the web server user -
public/datos.xlsxis present -
npm run buildhas been run andpublic/build/exists
Artisan commands run
Artisan commands run
-
php artisan migrate --force -
php artisan config:cache -
php artisan route:cache -
php artisan view:cache -
php artisan storage:link(if using public disk)
Background processes
Background processes
- Queue worker is running and supervised
-
php artisan queue:restartwas run after the latest deployment