Skip to content

cedmail/docker-magento

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Magento Dev Environment

Sample docker development environment for Magento 2.1

This environment use Nginx for the webserver in its own Docker container, there is a PHP 7.0 container for Magento (build based on php-7.0-fpm official). It is also using MariaDB latest version.

The system is also using Unison for Magento folder sync to avoid performance issue on OSX

Prerequisites

Have Unison installed on your env

brew install unison

optional

Have FSwatch installed also to monitor file changes

brew install fswatch

Install

  1. Download Magento CE from Magento Tech there is two options with or without sample data
  2. Unzip downloaded file in ~/magento
  3. Run docker-compose to launch all containers
docker-compose up

alternatively you can use

docker-compose up --build

to rebuild your images if needed (new option/extension for PHP for example)

  1. Now sync your magento folder using Unison
~/magento> unison . socket://localhost:5000/ -auto -batch

This will take time on first sync, but then only the changed files will be sync again

  1. Go to Magento Setup follow instruction. Database Information are (host:db, Login/password:magento). For the admin URL I strongly suggest to force admin only instead of having random ID in the name.
  2. After setup is done don't forget to change rights on the Magento folder one more time ~/magento> chmod -R a+rwx *
  3. Every time you chnage your Magento file you need to rerun the Unison command to avoid this you can use fswatch
~/magento>fswatch -o . | xargs -n1 -I{} unison . socket://localhost:5000/ -auto -batch

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages