Skip to content

ulreck-drulk/composer_platzi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Compose PHP Development Environment

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.

Prerequisites

Make sure you have Docker and Docker Compose installed on your system.

Usage

  1. Clone this repository:

    git clone https://github.com/ulreck-drulk/composer_platzi.git
  2. Navigate into the cloned repository:

    cd composer_platzi
  3. Start the Docker containers:

    docker compose up -d
  4. Access your PHP application at http://localhost:9000.

Services

  • 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.

Configuration

You can configure the PHP application environment variables in the docker-compose.yml file under the app service.

Development

You can edit your PHP code locally, and changes will be reflected immediately as the application is served from the host directory.

Disclaimer

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.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages