Giter VIP home page Giter VIP logo

magento2-docker's Introduction

Magento 2 Docker

Docker for Magento 2 development

Nginx 1.13 + (PHP 7.3 + OPCache + XDebug) + MariaDB + Redis + Elasticsearch 6.8

Requirements

MacOS:

Install Docker, Docker-compose.

Linux:

Install Docker and Docker-compose.

How to use

Clone this repository:

git clone [email protected]:underser/magento2-docker.git <project_folder>

Go to <project_folder>:

./init

Script ask you about project name, and link to git repo

Put all your project files under ./src directory

Run:

docker-compose up -d

Copy all your files from host machine to container by running:

./bin/copytocontainer --all

After initialization you'll get 7 docker containers running:

Container Ports(host/container) Description
<project_name>_nginx 80/8000 443/8443 Contains Nginx 1.13
<project_name>_phpfpm 80/80 ; 9000:9001 Contains (PHP 7.3 + OPCache + XDebug)
<project_name>_db 3300/3306 Contains MariaDB
<project_name>_elasticsearch 9200/9200 Contains Elasticsearch 6.8
<project_name>_mailhog 1025/1025 ; 8025/8025 Allow you reach emails from your app
<project_name>_redis-session n/6379 Allow you save your sessions in Redis
<project_name>_redis n/6379 Redis cache

If you want execute ./bin/magento, simply do:

./magento <command>

During development you can fetch problem with permissions, for example, when php process write file to your working directory, and on host machine you can't change that file, to resolve this exec:

./permission

this will make sure that your host user id equals user id in container

Note: If you use OS X - to make XDebug working exec this command in terminal

ifconfig lo0 alias 10.254.254.254

License

MIT © 2020 Roman Sliusar

magento2-docker's People

Contributors

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