Перейти к содержимому

Laravel Docker with Apache, PHP & MySQL (Urdu)

Muhammad Yasir Amin

0:00 / 0:00

Laravel Docker with Apache, PHP & MySQL (Urdu)

70 просмотров · 3 нед. назад
Muhammad Yasir Amin
29 подписчиков
70 просмотров · 3 нед. назад
Lesson 2: Apache, PHP & MySQL Setup In this Laravel with Docker lesson, we walk through the Apache, PHP and MySQL setup from the project's lesson-2 Git tag (commit 189d683). The application uses PHP 8.2 with Apache, and Docker Compose adds a separate MySQL 8.0 database service. Configuration covered: Dockerfile: php:8.2-apache, ZIP and PDO MySQL extensions, Apache mod_rewrite and Laravel directory permissions .docker/apache/default.conf: DocumentRoot /var/www/html/public, AllowOverride All and Require all granted docker-compose.yaml: web and db services, the project bind mount, Apache configuration mount and depends_on: db Laravel HTTP access at localhost:8081 (8081:80) MySQL host access on port 3307 (3307:3306), with container-to-container access through db:3306 The laravel_app database and persistent dbdata volume mounted at /var/lib/mysql Building, starting and inspecting the containers Snapshot notes: The tracked .env.example still selects SQLite; starting the MySQL service alone does not switch Laravel's database connection. depends_on controls startup order and does not include a database readiness health check in this tag. MYSQL_PASSWORD is configured without MYSQL_USER, so this snapshot does not define a separate application database user. Written tutorial, files and commands: https://yasiramin.dev/portfolio/blogs... Lesson 1:    • Laravel Docker Setup with PHP 8.2 & Apache...   Full course:    • Laravel with Docker | Practical Lessons   Course and written lessons: https://yasiramin.dev/portfolio/cours... Source snapshot (private repository; authorized access required): https://gitlab.com/yasiramin380/larav... Narration: Urdu. Written tutorial: English. Subscribe for more practical Laravel and Docker lessons. Background music: "Vlog - Vlog Vlogs Music" by GR0ZA from Pixabay, used under its Content License. https://pixabay.com/music/trap-vlog-v... #Laravel #Docker #Apache #PHP #MySQL