https://github.com/ftmahringer/base-webserver
A simple Docker-based PHP, NGINX, MariaDB, Redis, and phpMyAdmin stack for fast local development.
https://github.com/ftmahringer/base-webserver
dev-environment development-stack docker mariadb nginx php phpmyadmin redis web-development
Last synced: about 1 month ago
JSON representation
A simple Docker-based PHP, NGINX, MariaDB, Redis, and phpMyAdmin stack for fast local development.
- Host: GitHub
- URL: https://github.com/ftmahringer/base-webserver
- Owner: FTMahringer
- Created: 2025-05-07T10:30:39.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-05-07T14:26:02.000Z (9 months ago)
- Last Synced: 2025-05-29T13:25:42.296Z (9 months ago)
- Topics: dev-environment, development-stack, docker, mariadb, nginx, php, phpmyadmin, redis, web-development
- Language: PHP
- Homepage:
- Size: 209 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π FTM Docker Web Stack
This project sets up a **modern PHP development environment** using Docker, including:
β
**NGINX** (web server)
β
**PHP-FPM** (with custom `php.ini`)
β
**MariaDB** (MySQL-compatible database)
β
**phpMyAdmin** (database web UI)
β
**Redis** (caching)
β
**RedisInsight** (visual Redis browser)
---
## π¦ Whatβs Inside?
| Service | Description |
| ---------------- | ------------------------------------------ |
| **NGINX** | Lightweight web server with custom config |
| **PHP-FPM** | FastCGI PHP engine with tuned PHP settings |
| **MariaDB** | MySQL-compatible database for development |
| **phpMyAdmin** | Web interface to manage MariaDB |
| **Redis** | Fast in-memory key-value store |
| **RedisInsight** | UI to explore and debug Redis data |
---
## ποΈ Project Structure
```
.
βββ app/ β Your PHP project code goes here
βββ docker/
β βββ nginx/
β β βββ nginx.conf β Custom NGINX configuration
β βββ php/
β β βββ Dockerfile β Custom PHP build (with extensions/settings)
β β βββ php.ini β Custom PHP settings
βββ docker-compose.yml β Orchestrates all services
βββ .env β Environment variables for the stack
```
---
## βοΈ Quick Start
1οΈβ£ **Clone the repo**
```bash
git clone https://github.com/FTMahringer/Base-Webserver.git
cd BASE-Webserver
```
2οΈβ£ **Create your `.env`**
Already provided, but adjust as needed:
```
MYSQL_ROOT_PASSWORD=rootpassword
MYSQL_DATABASE=dbname
MYSQL_USER=user
MYSQL_PASSWORD=password
PMA_HOST=mariadb
```
3οΈβ£ **Start the stack**
```bash
docker compose up -d --build
```
4οΈβ£ **Access services**
* Your PHP app β [http://localhost](http://localhost)
* phpMyAdmin β [http://localhost:8080](http://localhost:8080)
* RedisInsight β [http://localhost:8001](http://localhost:8001)
---
## π οΈ Customizations
* **Nginx config** β `docker/nginx/nginx.conf`
* **PHP settings** β `docker/php/php.ini`
* **Dockerfile for PHP** β `docker/php/Dockerfile`
You can modify these to fit your projectβs needs.
---
## π‘ Notes
* Database data persists in the `mariadb_data` volume.
* Redis data persists in the `redis_data` volume.
* NGINX logs are saved in the `nginx_logs` volume.
To clear everything (β **will delete all data**):
```bash
docker compose down -v
```
---
## π Credits
Created by **Fynn Mahringer** (FTM)
If you use this, feel free to β star the repo and contribute!