manuerumx / docker-boilerplate-for-php

Docker basic configuration for php/mysql projects.

Repository from Github https://github.commanuerumx/docker-boilerplate-for-phpRepository from Github https://github.commanuerumx/docker-boilerplate-for-php

Getting started

  1. Put your sources inside the project directory
  2. Install dnsmasq to resolve *.local to 127.0.0.1
    • Run: bin/install-dnsmasq-mac.sh
    • Not in mac? Add manually the domains to /etc/hosts
  3. Build the custom images for the project (Optional)
    • DB (MySQL)
      • cd docker_resources/db
      • docker build -t development:mysql .
    • Web (Apache/PHP)
      • cd docker_resources/web
      • docker build -t development:project .

Go to the root of the project and

docker-compose up

Wait until the MySQL server is configured, then you can access your project through

http://project.development.local

Data

The data from MySQL is stored in the directory db-data, so you don't lose your information every time you start/rebuild the containers.

About

Docker basic configuration for php/mysql projects.

License:MIT License


Languages

Language:Shell 77.5%Language:Dockerfile 22.5%