Skip to content

A complete Laravel development environment powered by Docker and Docker Compose, including PHP 8.2, Nginx, MySQL 8.0, Mailhog, and PhpMyAdmin. Follows containerization best practices and supports hot reloading for efficient development.

Notifications You must be signed in to change notification settings

murilolivorato/laravel_docker_enviroment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setting Up a Laravel Development Environment with Docker and Docker Compose

A comprehensive guide to setting up a robust Laravel development environment using Docker and Docker Compose, featuring multiple services and best practices for containerization.

Intro

More information at - https://medium.com/@murilolivorato/setting-up-a-laravel-development-environment-with-docker-and-docker-compose-a-step-by-step-5e37670ae640

Overview

This project demonstrates how to set up a complete Laravel development environment using Docker, including:

  • PHP 8.2 with FPM
  • Nginx web server
  • MySQL 8.0 database
  • Mailhog for email testing
  • PhpMyAdmin for database management
  • Docker Compose for service orchestration

Features

  • Containerized Laravel development environment
  • Multiple service integration
  • Email testing capabilities
  • Database management interface
  • Easy service scaling
  • Environment isolation
  • Development and production configurations
  • Hot-reloading support

Prerequisites

  • Docker Engine
  • Docker Compose
  • Git
  • Basic understanding of Laravel
  • Basic understanding of Docker concepts
  • Administrative privileges on your system

System Requirements

  • Compatible operating system (Linux, macOS, or Windows)
  • Administrative privileges
  • Internet connection
  • Minimum 4GB RAM (8GB recommended)
  • 20GB free disk space

Installation

1. Install Docker

For Windows:

  1. Download Docker Desktop from Docker's official website
  2. Run the installer
  3. Enable Hyper-V when prompted
  4. Follow the installation wizard
  5. Restart your computer

For macOS:

  1. Download Docker Desktop for Mac
  2. Drag Docker to your Applications folder
  3. Open Docker from Applications
  4. Follow the setup wizard

Run those commands

  • docker-compose up -d --build
  • docker-compose run --rm composer install
  • docker-compose run --rm artisan key:generate

👥 Author

For questions, suggestions, or collaboration:

🙏 Acknowledgments

  • FastAPI documentation
  • React documentation
  • Kubernetes documentation
  • Docker documentation
  • Open source community

📸 Screenshots

Running Commands

Running Commands

Created

Created

Access the Database

Access the Database

Laravel App is Running

Access the Database

⭐ Star This Repository ⭐

Your support helps us improve and maintain this project!

GitHub Stars

About

A complete Laravel development environment powered by Docker and Docker Compose, including PHP 8.2, Nginx, MySQL 8.0, Mailhog, and PhpMyAdmin. Follows containerization best practices and supports hot reloading for efficient development.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published