Giter VIP home page Giter VIP logo

magento2-environment's Introduction

Meanbee Environment Example

This repository is the development environment that Meanbee are using for their Magento 2 builds.

This repository will build a Magento 2 instance and inject the configured extensions into it.

We are currently running:

  • PHP 7
  • NGINX
  • MySql

Development Environment Setup

cp composer.env.sample composer.env
cp current.env.sample current.env

git submodule init
git submodule update --remote

docker-compose run cli /usr/local/bin/magento-installer
docker-compose run cli /tools/setup.sh
docker-compose up -d

You can now visit http://meanbee-environment.docker/

Configuring xDebug

You'll need to setup path mapping in Languages & Frameworks -> PHP -> Servers. Assuming your checkout on your local machine is $basedir, configure the following:

  • $basedir -> /src
  • $basedir/src -> /src/src
  • $basedir/magento -> /magento
  • $basedir/magento/src -> /src

##Running Tests

To run unit tests:

docker-compose run --rm cli /tools/run_unit_tests.sh

To run integration tests:

docker-compose run --rm cli /tools/run_integration_tests.sh

Adding new extensions

When adding new submodules we should make sure that we are tracking against a remote branch instead of a specific commit. To do that we need to run the following:

git submodule add -b develop [email protected]:meanbee/example-magento2-module.git extensions/meanbee-example-magento2-module2

With the submodule added we now need to ensure that the extension is installed and configured when bin/setup.sh is executed. To do this, edit bin/setup.sh with:

  • Add local path reference to repository, e.g. $COMPOSER config repositories.meanbee_example-magento2-module2 path /src/extensions/meanbee-example-magento2-module2
  • Require your package in Magento's composer.json, e.g. $COMPOSER require "meanbee/example-magento2-module2" "*"
  • Enable your extension within Magento (if applicable), e.g. $MAGENTO_TOOL module:enable Meanbee_ExampleMagento2Module2

magento2-environment's People

Contributors

brideo avatar

Watchers

Adriano Aguiar avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.