What’s Magento
- Open-Source PHP eCommerce
- Large community
- Full-featured eCommerce Platform (Products, Checkout, Order, Customer,…)
- Incredibly flexible & highly structured
- Very steep learning curve due to complexity
- Enterprise edition & cloud edition available
Prerequisites
In this note, we will install Magento version 2.4.6-p2. It’s required some equipments. If you install another version, please check system requirements firstly.
- PHP >= 8.1 (should use PHP 8.2)
- Composer >= 2.2
- MySQL >= 8.0 (MariaDB >= 10.6)
- Opensearch >= 2.5 (Elasticsearch 7.17)
- Redis >= 7.0 (Optional - Handle cache and session if not, can use file)
- RabbitMQ >= 3.11 (Optional)
- Varnish >= 6 (Optional - Handle full page-cache)
Docker
If you do not understand Docker. You can read note firstly: Docker
Folder structured
List services
Explain container:
generic
: include global configuration for PHP-FPMfpm & fpm-debug
: PHP-FPMnginx
,mysql
,elasticsearch
: create & configuration for nginx, mysql, elasticsearch
Environment Variables
Nginx
PHP-FPM
You can switch PHP version from Magento Docker Hub. The tag image has format: <php_version>-fpm-<docker-ver-tag>
Example: image 8.2-fpm-1.3.6