Laravel Docker Lessons · Lesson 6
Connect Laravel 12 to PostgreSQL 17 using Docker Compose, PDO pgsql, health checks, persistent storage, migrations and a real users Blade demo.
This written tutorial follows the actual lesson-6 source snapshot . The published Urdu video lesson is available alongside this written guide.
Continue from Lesson 5 , or browse the complete blog .
This lesson adds an optional PostgreSQL 17 stack to the existing Laravel 12 / PHP 8.2-FPM / Nginx project. The normal docker-compose.yaml still uses MySQL. Select the standalone docker-compose.postgres.yaml file for this lesson; do not merge it with the MySQL file.
Recording preparation and follow-up checks
Use PHP 8.2+ for host Composer. Check the PHP executable selected by your recording terminal. After switching back from a newer lesson, run composer install against this tag's own lock file.…