2017 © Pedro Peláez
 

library platformsh-deploy-php

Library to create build and deployment processes for PHP applications hosted on Platform.sh

image

dnunez24/platformsh-deploy-php

Library to create build and deployment processes for PHP applications hosted on Platform.sh

  • Thursday, March 9, 2017
  • by dnunez24
  • Repository
  • 0 Watchers
  • 1 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Platform.sh PHP Deploy

This is a foundational library to create build and deployment processes for PHP applications hosted on Platform.sh., (*1)

Getting Started

Implement your concrete build strategy by extending the abstract class from this library:, (*2)

<?php

namespace MyVendor\MyApp\Strategy;

use Dnunez24\Platformsh\Strategy\AbstractBuildStrategy;

class BuildStrategy extends AbstractBuildStrategy
{
    public function build()
    {
        // add your build steps here
    }
}

You can also implement the strategy interfaces directly:, (*3)

<?php

namespace MyVendor\MyApp\Strategy;

use Dnunez24\Platformsh\Strategy\BuildStrategyInterface;

class BuildStrategy implements BuildStrategyInterface
{
    public function build()
    {
        // add your build steps here
    }

}

Create your build command, (*4)

<?php

namespace MyVendor\MyApp\Command;

use Dnunez24\Platformsh\Command\AbstractBuildCommand;

class MyBuildCommand extends AbstractBuildCommand
{
    protected function configure()
    {
        // Add Symfony Console configuration steps here
        // See: http://symfony.com/doc/current/console.html#configuring-the-command
    }
}

Then create the Symfony Console application in your project, someplace like bin/myapp:, (*5)

#!/usr/bin/env php

<?php

use Symfony\Component\Console\Application;
use MyVendor\MyApp\Strategy\BuildStrategy;
use MyVendor\MyApp\Strategy\DeployStrategy;
use MyVendor\MyApp\Command\BuildCommand;
use MyVendor\MyApp\Command\DeployCommand;

$buildStrategy = new BuildStrategy();
$buildCommand = new BuildCommand($buildStrategy);

$deployStrategy = new DeployStrategy();
$deployCommand = new DeployCommand($deployStrategy)

$application = new Application();
$application->add($buildCommand);
$application->add($deployCommand);
$application->run();

Finally, run your scripts to build and deploy the app:, (*6)

composer exec bin/myapp build
composer exec bin/myapp deploy

The Versions

09/03 2017

dev-master

9999999-dev https://github.com/dnunez24/platformsh-deploy-php

Library to create build and deployment processes for PHP applications hosted on Platform.sh

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Nuñez

deployment deploy platformsh platform.sh