Skip to content

Docker Stack with Magento 2 latest installer. Containers: Varnish, Nginx, PHP, Opensearch, MariaDB, Redis, Mailhog, RabbitMQ, Watchtower. One Stack for all Projects by adjusting .env file

License

Notifications You must be signed in to change notification settings

aliuosio/mage2.docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker stack with Magento 2 latest installer

One Stack for all Projects by adjusting .env file

Docker containers: Varnish, Nginx, PHP, Opensearch, MariaDB, Redis, Mailhog, RabbitMQ, Watchtower using sockets with PHP (linux/amd64, linux/arm64) instead of TCP/IP for redis sessions and MySQL

RabbitMQ, MailHog, Watchtower are commented out of the docker-compose.yml to run projects parallel you need to add a proxy like Traefik or nginx-proxy

Get Source

git clone https://github.com/aliuosio/mage2.docker.git

check for updates with git fetch && git pull

Installation

Fresh Installation (latest magento 2 version) or your running project when located in your filesystem

cd mage2.docker
chmod +x bin/*
bin/install

with bin/install config you can use prompts to configure install (USING the command with config IS BUGGY. FEEL FREE TO CONRIBUTE)

use .env to change values after installation and activate on restart of containers

Backend

http://localhost/admin
User: mage2_admin
Password: mage2_admin123#T

Frontend

http://localhost

next startup after reboot of Host

bin/start

Install sample data

bin/sample-data

PHP Container Usage

docker exec -it mage2_php bash

Mailhog Usage

bin/install script configures the default magento 2.4.6 mail settings to run with mailhog

Mail Client
http://localhost:8025 

Features

  • Fresh Install or use existing magento 2 project on your file system using bin/install config
  • alternative OSX docker-compose file using docker-sync for better performance
  • set project directory to where ever you want (as configurable option in .env)
  • Mailhog container
  • Extra Composer Packages with Magento 2 Installer
  • Xdebug as configurable option (xdebug.idekey=PHPSTORM)

Todos

  • setup php image for windows and osx
  • configure mailhog with bin/install
  • add cache warmer
  • fix bin/install config
  • reduce the number of volumes

Support

If you encounter any problems or bugs, please create an issue on GitHub.

Contribute

Please Contribute by creating a fork of this repository.
Follow the instructions here: https://help.github.com/articles/fork-a-repo/

License

License: MIT

About

Docker Stack with Magento 2 latest installer. Containers: Varnish, Nginx, PHP, Opensearch, MariaDB, Redis, Mailhog, RabbitMQ, Watchtower. One Stack for all Projects by adjusting .env file

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published