Magento 2.4.6 Magento Commerce Cloud
This repository contains a sample Magento Commerce (on-premise) version 2.4.6 instance for you to deploy in the cloud. You must have an active Magento Commerce Cloud user license to use the example in this repository.
The example requires the use of Composer to load and manage dependencies and Magento vendor folders.
Authentication
You must have an authentication key to access the Magento Commerce repository and to enable install and update commands for your Magento Commerce Cloud project.
The following method is best to prevent accidental exposure of credentials, such as pushing an auth.json
file to a public repository. If you plan to use Docker for your local development, then jump to the Authenticating in Docker section.
To add authentication keys using an environment variable:
-
In the Project Web UI, click the configuration icon in the upper left corner.
-
In the Configure Project view, click the Variables tab.
-
Click Add Variable.
-
In the Name field, enter
env:COMPOSER_AUTH
. -
In the Value field, add the following and replace
<public-key>
and<private-key>
with your Magento Commerce Cloud authentication credentials.{ "http-basic": { "repo.magento.com": { "username": "<public-key>", "password": "<private-key>" } } }
-
Select Visible during build and deselect Visible at run.
-
Click Add Variable.
See Adding Magento authentication keys.
Authenticating in Docker
You must have an auth.json
file that contains your Magento Commerce authorization credentials in your Magento Commerce Cloud root directory.
-
Using a text editor, create an
auth.json
file and save it in your Magento root directory. -
Replace and with your Magento Commerce authentication credentials.
{ "http-basic": { "repo.magento.com": { "username": "<public-key>", "password": "<private-key>" } } }
-
Save your changes to
auth.json
file and exit the text editor.
To use Docker for local development, see Launching a Docker configuration.
Repository structure
The following is a list of the specific files required for this example to work in the Magento Commerce Cloud:
.magento/
/routes.yaml
/services.yaml
.magento.app.yaml
auth.json
composer.json
magento-vars.php
php.ini
.magento/routes.yaml
—redirectswww
to the naked domain andphp
application to serve HTTP..magento/services.yaml
—sets up a MySQL instance, including Redis and ElasticSearch.composer.json
—fetches the Magento Enterprise Edition and configuration scripts to prepare your application.
Developer documentation
See the Magento Commerce Cloud Guide.
License
Each Magento source file included in this distribution is licensed under the OSL-3.0 license.
Please see LICENSE.txt for the full text of the Open Software License v. 3.0 (OSL-3.0).