Modern Docker-based starter kit for PHP applications built on FrankenPHP — a Caddy-powered PHP server with HTTP/2, HTTP/3, and automatic HTTPS.
- Quick Start
- Overview
- Requirements
- Available Commands
- Framework Installation
- Environments
- Production
- CI/CD
- Security
- License
git clone https://github.com/rdurica/php_starter_kit.git && cd php_starter_kit && make initThen open https://localhost (auto-generated certificate) and select your framework from the setup wizard.
This starter kit provides a ready-to-use, out-of-the-box local development environment for modern PHP projects. It comes preconfigured with everything you need to start coding immediately, without wasting time on setup and configuration.
Key aspects:
- FrankenPHP — Modern PHP application server with HTTP/2, HTTP/3, and automatic HTTPS
- Secure by default — Non-root user, security headers, hardened sessions, no
expose_php - Multi-environment — Dev and CI configurations
- Multi-stage production build — Minimal attack surface, optimized layers
- CI/CD ready — GitHub Actions with code quality, tests, security scanning
- DevContainer support — VSCode remote containers out of the box
- One-click framework installer — Web-based setup wizard for Laravel, Symfony, and Nette
- Frontend ready — Node.js and Vite integrated in the dev container
- Docker & Docker Compose
- Make (optional but recommended)
sudoaccess for trusting local HTTPS certificates
Common development tasks are automated via make. These commands manage the Docker containers and development workflow.
| Command | Description |
|---|---|
make init |
First-time setup: network, images, containers |
make up |
Start containers in detached mode |
make down |
Stop and remove containers |
make logs |
Show live logs from all containers |
make php |
Open shell inside the FrankenPHP container |
make rebuild |
Force rebuild images (--pull --no-cache) |
make reload |
Rebuild images with cache |
make setup-githooks |
Enable pre-commit hooks |
make trust-cert |
Trust Caddy's local CA certificate |
After running make init, open https://localhost. The setup wizard will present three framework options:
| Framework | Description |
|---|---|
| Symfony | Robust architecture with reusable components |
| Laravel | Expressive syntax and rich ecosystem |
| Nette | Security-focused, Czech-made framework |
Click your chosen framework and confirm the installation. The wizard will:
- Download and install the framework via Composer
- Display real-time progress and terminal output
- Move files into place automatically (including Nette's
www/→public/migration) - Back up the landing page to
/setup.php
After installation, you can delete /setup.php via the success dialog or manually:
- FrankenPHP with xdebug, Node.js, Git, Symfony CLI, Laravel installer
- Caddy auto HTTPS on https://localhost
- Vite dev server running in the background
- Volume mount for live code editing
- Lightweight FrankenPHP image (no xdebug, no Node)
- SQLite in-memory for fast tests
- Ideal for GitHub Actions
Build the production image:
docker build -f build/prod/Dockerfile -t myapp:latest .Three GitHub Actions workflows are included:
| Workflow | Description |
|---|---|
code-quality.yml |
PHPStan, PHP CS Fixer, Composer audit, Frontend lint |
ci.yml |
Framework auto-detection, PHPUnit tests, Docker lint |
build.yml |
Multi-stage prod image build, GHCR push, Trivy security scan |
This project is licensed under the terms of the MIT license.



