This project provides a ready-to-use Docker development environment for PHP 7.4 with Apache and MySQL, ideal for PHP projects.
The purpose of this template is to simplify the setup of a standard PHP development environment. With this Docker stack, you can quickly start projects, test, and deploy PHP applications with a complete configuration.
- PHP: version 7.4
- Apache: version 2
- MySQL: version 5.7
- PHP Extensions: PDO, GD, and others.
-
Clone this repository:
git clone https://github.com/your-username/docker-php7.4-template.git my-project
-
Create the
wwwfolder for your code:mkdir www
-
Launch Docker services:
docker-compose up -d
- URL: http://localhost
Host: localhost
Port: 3306
Database: my_database
Username: my_user
Password: my_password
- Add your PHP files to the
www/folder to make them accessible within your development environment. - Any changes made to the files in the
www/folder are immediately visible in the browser. ###Accessing Logs To track errors and events for each service, use the following command:
docker-compose logsThis Docker template provides a solid base to develop and test your PHP applications, streamlining your workflow.
This structure includes GitHub-formatted command blocks, making it easy to follow for users who copy it into their own repositories.