Deploying Modern Laravel Applications
Laravel in production is Nginx, PHP-FPM, a real queue worker, Redis, PostgreSQL and backups you have restored at least once. Docker only helps if local and production share the same images — not as a costume around a still-manual server.
The stack that actually runs
PHP-FPM behind Nginx. Redis for cache and queues. PostgreSQL with backups you have practised. A worker process that is supervised, not a cron that “usually works”.
Email-tracking and other long jobs taught me this: if Horizon is down, the product looks fine and silently dies. Health checks must include the queue.
Deploy is a process
Migrate forward, health-check, then switch traffic. Not upload-and-hope. If you cannot roll back, you have not deployed — you have gambled.
I keep Docker images identical between my Tangier workstation and production so “works on my machine” is a shared artefact, not a joke.
Key takeaways
- Supervise queue workers like the web process.
- Restore a backup before you trust it.
- A deploy you cannot reverse is a gamble.
FAQ
Is Docker required for Laravel production?
No. Identical, repeatable builds are required. Docker is one way to get there. A still-manual server with a Dockerfile on the side is not Docker in production.