All of your code is contained in the Magento Commerce Cloud Starter project. The project is your Magento store code, extensions, and integrations on a
master branch. Each project supports up to 4 total environments including up to three active Integration environments and a Production environment using the
All environments are in PaaS (Platform-as-a-Service) containers. These containers are deployed inside highly restricted containers on a grid of servers. These environments are read-only, accepting deployed code changes from branches pushed from your local workspace.
You can use any development and branching methodology you like. We strongly recommend creating a Staging environment and branch as one of the Integration environments.
Production with a master branch
The Production environment is your live store(s) and site(s). The environment includes your
master branch, a web server, database, and configured services to fully test your site.
The Production environment runs your public-facing Magento single and multi-site storefronts. This system is read-only, requiring deployment across the architecture from the Integration environment to the Staging environment, and finally to the Production environment.
We highly recommend fully testing in your Staging environment and branch before pushing to the
master branch which deploys to the Production environment.
Staging branch and environment
We recommend creating a branch called
master. The Staging environment is created from the
staging branch to provide a pre-production environment to test code, modules and extensions, payment gateways, shipping, product data, and much more. This environment provides the configuration for all services to match the Production environment including Fastly, New Relic APM, Blackfire, and search.
Additional sections in this guide provide instructions and walk-throughs for final code deployments and testing production level interactions in a safe Staging environment. For best performance and feature testing, replicate your Production database into the Staging environment.
Developers use the Integration environment to develop, deploy, and test:
- Magento application code
- Custom code
You can have up to two active Integration environments on a grid for two active branches. Each Integration environment matches the name of the branch and includes a web server, database, and configured services to fully test your site.
You can have an unlimited number of inactive branches to store code. To access, view, and test inactive branches, you must activate them.
The Integration environment does not support all services. For example, Fastly CDN is not accessible in an Integration environment.
The process for developing in Integration requires the following process:
- Branch and develop off of the
- Develop all work on your local workspace in these branches
- Push code to Git to build and deploy on an Integration environment for testing
- As work is completed, merge to the
Production and Staging technology stack
The Production and Staging environments include the following technologies. You can modify and configure these technologies through the .magento.app.yaml file.
- Fastly for HTTP caching and CDN
- Nginx web server speaking to PHP-FPM, one instance with multiple workers
- Redis server
- Elasticsearch for searching for Magento Commerce Cloud 2.1 and later
Magento Commerce Cloud currently supports the following services: PHP, MySQL (MariaDB), Elasticsearch (Magento 2.1.x and later), Redis, and RabbitMQ.
Each service runs in its own secure container. Containers are managed together in the project. Some services are built-in, such as the following:
- HTTP router (handling incoming requests, but also caching and redirects)
- PHP application server
- Secure Shell (SSH)
You can even have multiple applications running in the same project. Building a microservice oriented architecture with Magento Commerce is as easy as managing a monolithic application.
Magento Commerce Cloud uses:
- Operating system: Debian GNU/Linux
- Web server: nginx
You cannot upgrade the operating system and web server software to a new version, but you can configure versions for the following software:
In the Staging and Production environments, you use Fastly for CDN and caching. When your environment is initially provisioned, we install the latest version of the Fastly CDN extension for Magento. You can upgrade the extension to get the latest bug fixes and improvements. See Fastly CDN module for Magento 2.
You use the following files to configure the software versions that you want to use in your implementation.
Backup and disaster recovery
You can create a snapshot of your database and file system using the Project Web Interface or the CLI. The snapshot includes your deployed code, installed software and services, and data. See Snapshots and backup management.
Prepare for development
To branch and develop your Magento store:
- Set up your local environment
- Clone the
masterbranch from the Project to your local environment
- Create a
- Create branches for development from
- Push code to Git that builds and deploys to an environment for testing