This project targets the requirements to create a local development stack using the most common stack in web development (Linux Apache MySQL PHP).
- Clone this repo
- Navigate to the project folder
- Run it using:
docker-compose up* Apache
* PHP 4.3.22
* Composer
* MySQL 8
* Adminer
- Save your code to the src folder
- (totally optional) To create virtualhost, edit the conf/apache2/sites-available contents and add your custom configuration, enable it running:
docker exec -w /etc/apache2/sites-available/ docker-lamp_www_1 a2dissite <virtualhost-to-enable>.conf- (totally optional) Edit your local machine hosts file adding your new virtualhost ej:
127.0.0.1 <virtualhost-to-enable>.test- This stack includes composer to handle external packages. To run composer, edit the barebone composer.json file and run the command:
docker exec -w /var/www/html docker-lamp_www_1 composer update- The MySQL container expose the default port to the host machine, to connect use the following credentials:
- user/password: root/root
- server: localhost
- port: 3306
- The default PHP configuration load all the extensions and the default settings, to change the settings, edit the php.ini file from the conf/php/ directory.
- Log in to the container on localhost:8080 use the MySQL root credentials and point to the container id: docker-lamp_mysql_1
For any enquiries regarding this repo, please contact me at:
hey(at)deploythis.co