All Projects → JeroenBoersma → Docker Compose Development

JeroenBoersma / Docker Compose Development

Licence: mit
Clone and `bin/dev up`. Quickly start of developing locally with Nginx, PHP, Blackfire, Percona, Mailhog and Redis. Out of the box support for Magento2 Developer Box

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Docker Compose Development

Ddev
DDEV-Local: a local PHP development environment system
Stars: ✭ 915 (+435.09%)
Mutual labels:  magento, magento2, development, local-development, docker-compose
magento-ngrok
Magento 2 module for ngrok.io service support
Stars: ✭ 45 (-73.68%)
Mutual labels:  development, magento, magento2, local-development
Magento2 Varnish Redis Ssl Docker Compose
Deploy Magento2 with Varnish Cache and Redis with SSL termination using Docker-compose tool
Stars: ✭ 37 (-78.36%)
Mutual labels:  magento, magento2, docker-compose
Docker Magento
Mark Shust's Docker Configuration for Magento
Stars: ✭ 1,123 (+556.73%)
Mutual labels:  magento, magento2, docker-compose
m2devbox
🚀 Head start your Magento 2 extension development with pre-configured Docker environments.
Stars: ✭ 18 (-89.47%)
Mutual labels:  development, magento, magento2
Docker Magento Mutagen
Mage2click Docker-based development environment for Magento with mutagen.io sync for files on macOS
Stars: ✭ 64 (-62.57%)
Mutual labels:  magento2, local-development, docker-compose
Microservices Sample
Sample project to create an application using microservices architecture
Stars: ✭ 167 (-2.34%)
Mutual labels:  mysql, docker-compose
Module Profiler
Magento 2 Profiler
Stars: ✭ 116 (-32.16%)
Mutual labels:  magento, magento2
Magento Infinitescroll
Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.
Stars: ✭ 123 (-28.07%)
Mutual labels:  magento, magento2
Masquerade
Faker-driven, configuration-based, platform-agnostic, locale-compatible data faker tool
Stars: ✭ 152 (-11.11%)
Mutual labels:  magento, magento2
Jadedock
使用 Docker 快速部署简易的 Ngixn + PHP + MySQL + Redis 环境(可开发、可线上运行)
Stars: ✭ 109 (-36.26%)
Mutual labels:  mysql, docker-compose
M2cert
Adobe Magento2 Certification Study Guides - 2020/2021 Updates for M2 2.3/2.4
Stars: ✭ 147 (-14.04%)
Mutual labels:  magento, magento2
Magento 2 Social Login
Magento 2 Social Login extension is designed for quick login to your Magento 2 store without procesing complex register steps
Stars: ✭ 156 (-8.77%)
Mutual labels:  magento, magento2
Mc Magento2
MailChimp for Magento 2. Syncs all data (subscriber, customers, orders, products) and enables marketing automation with email campaigns, automations, ads, postcards and more.
Stars: ✭ 115 (-32.75%)
Mutual labels:  magento, magento2
Fallback Studio
Magento 2 PWA fallback wrapper to easily create a custom theme on top of PWA Studio
Stars: ✭ 111 (-35.09%)
Mutual labels:  magento, magento2
Symfony 4 Docker Env
Docker Environment for Symfony. PHP-FPM, NGINX SSL Proxy, MySQL, LEMP
Stars: ✭ 119 (-30.41%)
Mutual labels:  mysql, docker-compose
Magento2 Fixtures
Fixture library for Magento 2 integration tests by @schmengler (@integer-net)
Stars: ✭ 110 (-35.67%)
Mutual labels:  magento, magento2
Magento Chatbot
Magento Chatbot Integration with Telegram, Messenger, Whatsapp, WeChat, Skype and wit.ai.
Stars: ✭ 149 (-12.87%)
Mutual labels:  magento, magento2
Docker Compose Starter
Run your development environment with a simple command using docker-compose 🚀
Stars: ✭ 159 (-7.02%)
Mutual labels:  development, docker-compose
Magento2 Configurator
Magento 2 Configurator
Stars: ✭ 158 (-7.6%)
Mutual labels:  magento, magento2

Docker Development stack

Docker-compose-development aims to be a plug 'n play setup for you to quickly start developing locally with services as NGINX, PHP, Blackfire, Percona, MailHog and more!

Also, it contains different configurations for use with Symfony, Silex, Magento 1 & 2, on PHP5 / PHP7 and with XDEBUG enabled.

We follow a Code of Conduct.

Table of Contents

Prerequisites

Before continuing you must have the following installed and working correctly:

OSX users should also install:

  • Docker Sync and its dependencies

  • Coreutils using Homebrew brew install coreutils

  • Make sure that port 80/443 and 3306 are not being used by other services. sudo netstat -tupln|egrep '80|443|3306'

WSL users

# ssh-agent configuration
if [ -z "$(pgrep ssh-agent)" ]; then
    rm -rf /tmp/ssh-*
    eval $(ssh-agent -s) > /dev/null
else
    export SSH_AGENT_PID=$(pgrep ssh-agent)
    export SSH_AUTH_SOCK=$(find /tmp/ssh-* -name agent.*)
fi

if [ "$(ssh-add -l)" == "The agent has no identities." ]; then
    ssh-add
fi

How to get started

Make sure that you have the prerequisites installed and running correctly before proceeding.

1). Configure your environment

  1. Clone this repository:
git clone [email protected]:JeroenBoersma/docker-compose-development.git development
  1. Run bin/dev setup This will automaticly create a root user with a random password and adds your user with restricted rights.
  • persistant MySQL on a location of your choice. If you were already using this repository before (or want a local directory), you can map the existing volume with:
mkdir -p mysql;
docker volume create -o 'type=none' -o 'device='${PWD}'/mysql' -o 'o=bind' dockerdev-mysql-volume

Or, if you are on OSX:

docker-sync start

A optional, but recommended, step to take is to add the provided .bin/dev command to your system so you can use its commands anywhere you like.

  1. Run ./bin/dev profile from the development folder.
  2. Copy the output into ~/.bashrc ~/.bash_aliases ~/.zshrc, on your own preference.
  3. Log out and log back in for this to take effect. You could also just source the new files in your current terminal . ~/.bashrc.

If succeeded you can now use dev <command> from anywhere. You can also just type cdw which will take you to your workspace directory.

2). Configure your hostnames...

There are several ways of configuring hostnames.

By using DNSMASQ (preferred)

Only applies if you have DNSMASQ installed, otherwiste continue to use the hostfile instead.

Create a file /etc/dnsmasq.d/dev.conf and copy the following as its content: address=/.localhost/127.0.0.1

For Windows

Use Acrylic DNS Proxy. For more information check the website http://mayakron.altervista.org/wikibase/show.php?id=AcrylicHome

Or by using the hostfile

Add a hostname entry for each of your projects manually to /etc/hosts, e.g.: 127.0.0.1 mail.localhost 127.0.0.1 test.project.localhost

You should now be able to browse to http://test.project.localhost/info.php and get a phpinfo() output.

3). Now, setup your projects!

Inside the development folder you will find a folder called workspace. The folders follow a certain structure, as described below: customer/project/htdocs

For WSL

Docker for Windows automatically mounts to C:\workspace. You'll find your workspace there. To change this, update docker-compose-wsl.yml

You will notice that this has a 1-on-1 relation to the hostname provided in your hostfile: workspace/test/project/htdocs => https://test.project.localhost/

Other examples are:

  • workspace/iwant/coffee/htdocs => https://iwant.coffee.localhost/
  • workspace/iwant/beer/htdocs => https://iwant.beer.localhost/
  • workspace/nomore/soup4you/htdocs => https://nomore.soup4you.localhost/

To be compatible with various projects, we have included the following definitions as webroots:

  • htdocs
  • httpdocs
  • public
  • pub
  • web
  • magento

You can read more about project webroots in the Hosts and File structure documentation.

Xdebug

Xdebug is enabled with support for remote debugging on your local machine. It will try to connect to the host 172.17.0.1:9000 by default. Make sure to add a file mapping in your IDE: ./workspace/customer/project => /data/customer/project

Update your existing installation

To update your existing installation, follow these steps:

  • go to the development directory
  • git pull origin master
  • bin/dev rebuild
  • bin/dev setup

But wait, there is more!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].