Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐳 Containerized Web App - NGINX + PHP-FPM + MySQL

A web application fully containerized with Docker, built up in progressive stages (etape1 → etape4) from a single web server to a complete multi-service stack running a WordPress-style PHP application behind NGINX with a MySQL database - orchestrated by Docker Compose.


📶 Stages

Stage Focus
etape1 NGINX serving static content with a custom nginx.conf
etape2 Custom PHP image (php:7.4-fpm) with PDO / MySQL extensions
etape3 NGINX reverse-proxying requests to PHP-FPM
etape4 Full stack: NGINX + PHP-FPM + MySQL 8 via Docker Compose

🧱 Architecture (etape4)

        :8080          internal            internal
 client ────▶ [ nginx ] ────▶ [ php-fpm ] ────▶ [ mysql:8.0 ]
               http            script            database_wp
                    └──────── wp-network (bridge) ────────┘
  • http - NGINX, published on localhost:8080, mounts the app and config
  • script - PHP-FPM, built from the local Dockerfile
  • database_wp - MySQL 8, holds the application database

🚀 Run it

cd etape4
docker compose up -d
# open http://localhost:8080

⚠️ For real deployments, move MYSQL_ROOT_PASSWORD out of docker-compose.yml into an .env file (git-ignored) rather than committing credentials.


🛠️ Tech Stack

Docker Docker Compose NGINX PHP MySQL


📄 License

Released under the MIT License.

About

Web app fully containerized with Docker: NGINX + PHP-FPM + MySQL via Docker Compose

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages