de-swebhosting/oxideshop-surf-deployment

Surf deployment for OXID eShop

v2.0.0 2022-10-14 12:45 UTC

This package is auto-updated.

Last update: 2024-04-14 20:42:43 UTC


README

Run tests and linting

This library contains an application that allows the deployment of Oxid eShops with TYPO3 Surf.

How to use it

Simply add it as a composer dependency to your Surf project:

composer require de-swebhosting/oxideshop-surf-deployment

Then create a deployment using the OxidEshop application:

$application = new De\SWebhosting\OxidSurf\Application\OxidEshop();
$deployment->addApplication($application);

$application->setOption('branch', 'develop');
$application->setOption('repositoryUrl', 'git@myhoster.tld:my/oxid-project-repo.git');
$application->setDeploymentPath('/var/www/my-oxid-shop');

$node = new Node('myhost');
$node->setHostname('user@my-ssh-host');

$application->addNode($node);

Prepare your project

This deployment assumes that your project is based on the oxid-esales/oxideshop-project Composer package as described here

This deployment assumes, that you included an override config with your database and path configurations. Put this at the end of the source/config.inc.php file:

if (file_exists(__DIR__ . '/config.inc.override.php')) {
    include __DIR__ . '/config.inc.override.php';
}

Prepare your environment

On the server you deploy to create a config.inc.override.php at <deployment_root>/shared/source/config.inc.override.php configuring the database connection and the paths of the instance:

$this->dbHost = 'localhost';
$this->dbName = '<db_name>';
$this->dbUser = '<db_user>';
$this->dbPwd = '<db_pass>';
$this->sShopURL = 'https://my-shop-url.tld';
$this->sSSLShopURL  = 'https://my-shop-url.tld';
$this->sShopDir = '/<deployment_root>/releases/current/source/';
$this->sCompileDir = '/<deployment_root>/releases/current/source/tmp/';

You also need to create shared directories for files that should be persisted during deployments:

mkdir -p <deployment_root>/shared/out/contents
mkdir <deployment_root>/shared/out/downloads
mkdir <deployment_root>/shared/out/pictures

Enjoy

I hope this package works for you.

Feel free to open an issue to report errors or request features.