Skip to content

sheikhsulaiman/php-mysql-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP MySQL Docker Example

This project demonstrates a simple PHP + MySQL web application running in Docker containers. It includes a registration form that saves user data to a MySQL database and displays all registered users.

Features

  • PHP 8.2 with Apache
  • MySQL 8.0
  • User registration form (name, email)
  • Data is saved and displayed in a table
  • phpMyAdmin for database management
  • All services run via Docker Compose

Project Structure

php-mysql-docker/
├── docker-compose.yml
├── php/
│   ├── index.php
│   ├── process.php
├── sql/
│   └── init.sql

Getting Started

Prerequisites

Setup & Run

  1. Clone this repository:
    git clone https://github.com/yourusername/php-mysql-docker.git
    cd php-mysql-docker
  2. Start the containers:
    docker-compose up -d
  3. Open your browser and go to http://localhost:8080/php/index.php
  4. Access phpMyAdmin at http://localhost:8081 (user: root, password: root)

Stopping the App

docker-compose down

Customization

  • Edit php/index.php and php/process.php for your PHP logic.
  • Edit sql/init.sql to change the initial database schema.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published