Magento 2 EE example for Platform.sh. For demonstration purposes only.
PHP HTML JavaScript CSS XSLT Shell
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.platform
app
bin
dev
generated
lib
patches
phpserver
pub
setup
var
.gitignore Ignore system files Feb 20, 2018
.htaccess
.htaccess.sample
.php_cs
.php_cs.dist
.platform.app.yaml
.travis.yml
.user.ini
CHANGELOG.md
CONTRIBUTING.md
CONTRIBUTOR_LICENSE_AGREEMENT.html
COPYING.txt Update master to 2.2 Feb 19, 2018
Gruntfile.js
Gruntfile.js.sample
ISSUE_TEMPLATE.md
LICENSE.txt Add magento2-base and magento2-ee-base packages to the project structure Apr 5, 2016
LICENSE_AFL.txt
LICENSE_EE.txt
PULL_REQUEST_TEMPLATE.md
README.md
README_EE.md
auth.json.sample
composer.json
composer.lock
grunt-config.json.sample
index.php
magento-vars.php
nginx.conf.sample
package.json
package.json.sample
php.ini Upgrade yaml configuration to latest format Mar 31, 2016
php.ini.sample

README.md

Magento 2.2 (Enterprise Edition)

This is a no-thrills example of a minimal repository to deploy a Magento 2 Enterprise Edition instance on Platform.sh. This example is based on using Composer to load up dependencies and get the Magento vendor folders.

BEFORE YOU START

This project requires you to set up some things before you push your code. Click through the initial setup wizard till you get to the Continue later button, then go into your master environment configuration.

1. Project Variables

This project relies on the following project variables being set prior to initial deploy.

  • ADMIN_USERNAME (defaults to “admin”)
  • ADMIN_FIRSTNAME (defaults to “John”)
  • ADMIN_LASTNAME (defaults to “Doe”)
  • ADMIN_EMAIL (defaults to “john@example.com”)
  • ADMIN_PASSWORD (defaults to “admin12”)
  • ADMIN_URL (defaults to “admin”)
  • APPLICATION_MODE (defaults to “production”)

The latter can be changed at any time adjust the Application Mode on the next deploy.

2. MagentoCommerce credentials

This repository requires your Magento credentials to be added. You can do this via the project variables or an auth.json file in the repository. You can get those credentials in your MagentoCommerce account.

auth.json method

"http-basic": {
      "repo.magento.com": {
         "username": "<public-key>",
         "password": "<private-key>"
      }
   }

Project variables method

Create a new environment variable called env:COMPOSER_AUTH, and paste in the same JSON structure as for the auth.json method.

Tick JSON Value and Save.

Push your code

You can now push up your fork of this repository to your Platform.sh project and run the installer.

How it works

Here are the specific files for this example to work on Platform.sh:

.platform/
         /routes.yaml
         /services.yaml
.platform.app.yaml
auth.json
composer.json
magento-vars.php
php.ini

.platform.app.yaml has the basic configuration of our application (we call it mymagento). This configures a Composer based application, that we depend on a database called database and that we what to run a build script and a deploy script during deployment, and also set up some crons and file mounts.

In .platform/routes.yaml we just say that we will redirect www to the naked domain, and that the application that will be serving HTTP will be the one we called mymagento.

In .platform/services.yaml we say we want a MySQL instance, a Redis and a Solr. That would cover most basic Magento needs.

The composer.json will fetch Magento, and some configuration scripts to prepare your application for Platform.sh.