Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhP Server with MySQL Database

Php web server integrated with a mysql database

Getting Started 🚀

This is a guide for the deployment of this php server, no support will be provided

Check-out Installation for more information.

Requirements 📋

Needed programs

docker
docker-compose

Installation 🔧

Execute the following commands

git clone https://github.com/Javiito32/php-server.git
cd php-server
docker-compose up

Instead of docker-compose up you can use docker-compose up -d to start it in detached mode.

Start ✔️ and Stop 🛑

After the installation you can start and stop it with docker-compose start and docker-compose stop

Complete Deletion 🗑️

Use docker-compose down to remove the php server, mysql server, and docker network's

⚠️ The use of this command to stop it and then start it back with docker-compose up is not recommended, check Start ✔️ and Stop 🛑 instead

✔️ This won't remove the workdir www or the data of the database mysql.

🧹 To clean the database, remove all the contents of the mysql folder.

Access the WebServer ⚙️

Now the WebServer should be available at localhost:80

Modify Content 🔩

Use the www folder as your web workdir

cd www

Database connection ⛓️

The connection between PhP and MySQL is made via the created docker's network, you can also access it with this connection string

Server=localhost;Port=3306;Database=mainDB;Uid=root;Pwd=contrasenya;

You can modify the password and database name on docker-compose, make sure to change connection.php too.

License 📄

This project is under AGPL-3.0-only - Checkout LICENSE for more detail


⌨️ with ❤️ by Javiito32 😊

About

Php server with mysql database made over docker containers technology

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages