This repository contains a simple Docker Compose setup for PHP development. It includes PHP 8.1, Composer for managing dependencies, and MySQL 5.7 for database operations.
Make sure you have Docker and Docker Compose installed on your system.
-
Clone this repository:
git clone https://github.com/ulreck-drulk/composer_platzi.git
-
Navigate into the cloned repository:
cd composer_platzi
-
Start the Docker containers:
docker compose up -d
-
Access your PHP application at http://localhost:9000.
- app: PHP 8.1 server running with PHP-FPM, serving files from the
/var/www/html
directory. - composer: Composer container for managing PHP dependencies. It installs dependencies defined in
composer.json
. - db: MySQL 5.7 database container with a pre-defined database
projectdb
.
You can configure the PHP application environment variables in the docker-compose.yml
file under the app
service.
You can edit your PHP code locally, and changes will be reflected immediately as the application is served from the host directory.
This Docker Compose environment has not been tested extensively and is intended solely as a practice exercise to improve Docker skills. Use it at your own risk.
This project is licensed under the MIT License.