An open API service indexing awesome lists of open source software.

https://github.com/andrew-kandyba/laravel-docker

A sandbox for developing laravel applications.
https://github.com/andrew-kandyba/laravel-docker

development-environment docker docker-lamp docker-laravel docker-php laravel php php-laravel

Last synced: about 1 month ago
JSON representation

A sandbox for developing laravel applications.

Awesome Lists containing this project

README

          

# 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

```bash
> 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](http://localhost)**

`app/database/database.sqlite` – database

## Structure:

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

## Make

```bash
> 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`:

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

### Buggregator

This environment comes with **[Buggregator](https://docs.buggregator.dev/)** 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:

```bash
> make start
```

All telemetry becomes available in the web UI at **[http://localhost:8000](http://localhost:8000)**.

## License
This project is licensed under the MIT License - see the [**LICENSE**](LICENSE.md) file for details.