https://github.com/shahmal1yev/php-fpm-devkit
Lightweight PHP-FPM setup with Docker. Easy to use, version switchable.
https://github.com/shahmal1yev/php-fpm-devkit
Last synced: 4 months ago
JSON representation
Lightweight PHP-FPM setup with Docker. Easy to use, version switchable.
- Host: GitHub
- URL: https://github.com/shahmal1yev/php-fpm-devkit
- Owner: shahmal1yev
- License: mit
- Created: 2025-04-23T22:43:54.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-04-28T07:34:33.000Z (5 months ago)
- Last Synced: 2025-06-10T00:15:39.950Z (4 months ago)
- Language: Dockerfile
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP-FPM Docker Setup 🐘🐳
A minimal Docker-based PHP-FPM setup with runtime version switching and socket configuration. Ideal for local development and testing.
## ✨ Features
- 🔢 PHP version control via `__PHP_VERSION`
- 🔌 Unix socket at `/var/run/php/php-fpm.sock`
- 🧩 Pre-installed extensions: PDO, mbstring, zip, gd
- 📦 Composer and 🐞 Xdebug included
- ⚙️ Configuration managed via templated files## 🚀 Quick Start
```bash
__PHP_VERSION=8.3 make init
__PHP_VERSION=8.3 make
```## 🛠️ Makefile Commands
- `make init` — 📁 Copies default configuration files to editable versions
- `make` — 🛠️ Builds and starts the container
- `make build` — 🏗️ Builds the image only
- `make up` — 🚀 Starts the container
- `make down` — ⛔ Stops and removes containers and orphans
- `make rebuild` — ♻️ Rebuilds everything from scratch
- `make bash` — 🐚 Opens a shell in the container
- `make logs` — 📜 Tails container logs## 🗂️ Project Structure
```
📦 .
├── Dockerfile
├── Makefile
├── .env.example
├── docker-compose.yml
├── conf/
│ ├── php.default.ini
│ ├── www.conf.default.template
│ └── zz-docker.conf.default.template
```## 📝 Notes
- 📁 A Docker volume named `fpms` is used to store PHP FPM sockets
- 🔄 You can change PHP versions dynamically using `__PHP_VERSION` without modifying any files