Skip to content
Oleg Posyniak edited this page Apr 14, 2020 · 2 revisions

Testing ECE-Tools locally

To be able to run ECE-Tools locally without using Git-branches, create a binary file ./bin/dev-ece-tools:

#!/usr/bin/env php
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
require_once __DIR__ . '/../bootstrap.php';

$_ENV = [
    'MAGENTO_CLOUD_VARIABLES' => base64_encode(json_encode(
        [
            'ADMIN_EMAIL' => '[email protected]',
            'ADMIN_USERNAME' => 'admin2',
            'SCD_COMPRESSION_LEVEL' => '0',
        ]
    )),
    'MAGENTO_CLOUD_RELATIONSHIPS' => base64_encode(json_encode(
        [
            'database' => [
                0 => [
                    'host' => '127.0.0.1',
                    'path' => 'ece',
                    'password' => '1234',
                    'username' => 'root',
                    'port' => '3306',
                ],
            ],
            'elasticsearch' => [
                0 => [
                    'host' => 'localhost',
                    'port' => '9200'
                ]
            ]
        ]
    )),
    'MAGENTO_CLOUD_ROUTES' => base64_encode(json_encode(
        [
            'http://magento2.ece:8080/' => [
                'type' => 'upstream',
                'original_url' => 'http://{default}',
            ],
            'https://magento2.ece:8080/' => [
                'type' => 'upstream',
                'original_url' => 'https://{default}',
            ],
        ]
    )),
    'MAGENTO_CLOUD_APPLICATION' => base64_encode(json_encode(
        []
    )),
];

$container = new \Magento\MagentoCloud\App\Container(ECE_BP, YOUR_PROJECT_DIR);
$application = new \Magento\MagentoCloud\Application($container);
$application->run();
Clone this wiki locally