Skip to content

EslamKamel89/LaravelDockerized

Repository files navigation

LaravelDockerized 🚀

A fully Dockerized Laravel development environment designed to help PHP developers level up their DevOps game and build modern, scalable Laravel apps — no more "It works on my machine" excuses. 💻

Perfect for freelancers, job seekers, or anyone tired of shared hosting that only works in Egypt. 😉

📦 Features

Laravel – Latest and greatest
Nginx + PHP-FPM – Production-grade web server setup
MySQL – Persistent database with volume mounting
Redis – For caching, queues, and real-time magic
Queue Workers – Process jobs in the background
Task Schedulingschedule:work built-in
HTTPS via mkcert – Secure local development with laraveldocker.test
Composer & Artisan Containers – Run commands without local PHP
NPM/Vite Integration – Frontend tooling with hot reload support
PHPUnit Testing – Dedicated container for running tests
Dedicated Services – Clean separation of concerns (no monoliths!)
Works on macOS – No WSL2 freezes or file system lag

🚀 Quick Start

  1. Clone the repo

    git clone https://github.com/EslamKamel89/LaravelDockerized.git
    cd LaravelDockerized
  2. Build and start the stack

    docker compose up --build -d
  3. Install Laravel dependencies

    docker compose run --rm composer install
  4. Generate Laravel app key

    docker compose run --rm artisan key:generate
  5. Run migrations

    docker compose run --rm artisan migrate
  6. Visit your app

🛠️ Useful Commands

Task Command
Run Artisan commands docker compose run --rm artisan <command>
Run Composer docker compose run --rm composer <command>
Run NPM/Vite docker compose run --rm npm run dev
Run tests docker compose run --rm phpunit
Start queue worker docker compose up -d queue-worker
Start scheduler docker compose up -d scheduler
View logs docker compose logs -f

🔐 HTTPS Setup (mkcert)

To enable HTTPS:

  1. Install mkcert:
    brew install mkcert
    mkcert -install
  2. Generate certs:
    mkcert laraveldocker.test localhost 127.0.0.1 ::1
  3. Move certs to nginx/certs/
  4. Rebuild: docker compose up --build -d

🧪 Testing & Queues

  • Jobs and scheduled tasks are fully supported.
  • Queue worker and scheduler run as separate services.
  • Redis handles everything in the background.

🤝 Contributing

Found a bug? Want to add a feature? Pull requests are welcome!

🌟 Support

If this project helped you, consider giving it a ⭐️ on GitHub!


Made with ❤️ by Eslam Kamel
For developers who want to charge more than $5 for a website. 💸

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors