Skip to content

A minimal, fast, and robust environment suitable for local development, CI pipelines, and prototyping.

License

Notifications You must be signed in to change notification settings

andrew-kandyba/laravel-docker

Repository files navigation

LARAVEL SANDBOX

A streamlined docker setup for laravel development. Provides a minimal, fast, and robust environment suitable for local development, CI pipelines, and prototyping.

Requirements

  • make
  • docker 20.10+
  • docker compose 2.0+

Setup

> git clone git@github.com:andrew-kandyba/laravel-docker.git

> cd laravel-docker
> make build
> make install
> make start

Your application is available at: http://localhost

app/database/database.sqlite – database

Structure:

.
├── app/                # Generated by make setup
├── docker/
│   ├── nginx/
│   │   └── app.conf
│   └── php/
│       ├── Dockerfile
│       ├── php.ini
│       └── www.conf
├── docker-compose.yml
└── Makefile

Make

> make build    Build PHP image
> make install  Install Laravel
> make lint     Run linter
> make restart  Restart all containers
> make shell    Open shell in PHP container
> make start    Start containers
> make stop     Stop and remove containers
> make test     Run tests

Debugging

Xdebug

Pre-configured for debugging with:

  • Host: host.docker.internal
  • Port: 9003
  • IDE Key: PHPSTORM

PhpStorm

  1. Go to Settings → PHP → Servers
  2. Create server with name: laravel-sandbox
  3. Set host: localhost, port: 80
  4. Enable path mappings: ./app → /var/www
  5. Start listening for connections

VSCode

Add to .vscode/launch.json:

{
  "name": "Listen for Xdebug",
  "type": "php",
  "request": "launch",
  "port": 9003,
  "pathMappings": {
    "/var/www": "${workspaceFolder}/app"
  }
}

Buggregator

This environment comes with Buggregator pre-configured — a local telemetry hub for Laravel development that provides:

  • Mail capture (SMTP on port 1025)
  • VarDumper server (9912)
  • XHProf / Profiler
  • Inspector events
  • HTTP / logs inspection

All required settings are already included in the php container.

No additional configuration is needed — Buggregator receives data automatically after starting the containers:

> make start

All telemetry becomes available in the web UI at http://localhost:8000.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A minimal, fast, and robust environment suitable for local development, CI pipelines, and prototyping.

Topics

Resources

License

Stars

Watchers

Forks