Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
make compatible with deployer 6
Browse files Browse the repository at this point in the history
  • Loading branch information
dpfaffenbauer committed Nov 3, 2017
1 parent 5f077b2 commit 0ee1b24
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 35 deletions.
18 changes: 0 additions & 18 deletions .deployer/servers.yml

This file was deleted.

16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ composer require w-vision/pimcore-deployer

Installation installs deployer as well.

Now copy following files into your root-folder:

```
vendor/w-vision/pimcore-deployer/deploy.sample.php -> deploy.php
```

Edit .deployer/servers.yml to your configuration.

## Usage

There is a sample deployer configuration file, which shows you how to configure deployer for Pimcore.
There is a sample deployer configuration file, which shows you how to configure deployer for Pimcore.

### Start Deployment

```
vendor/bin/dep deploy
```
14 changes: 10 additions & 4 deletions deploy.sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@
namespace Deployer;

require __DIR__ . '/vendor/deployer/deployer/recipe/symfony3.php'; //Comes form deployer.phar
require __DIR__ . '/vendor/w-vision/pimcore-deployer/recipe/pimcore.php';
require __DIR__ . '/vendor/w-vision/pimcore-deployer/recipe/yarn.php';
require __DIR__ . '/vendor/w-vision/pimcore-deployer/recipes/pimcore.php';
require __DIR__ . '/vendor/w-vision/pimcore-deployer/recipes/yarn.php';

host('domain.com')
->user('username')
->port(22)
->set('deploy_path', '/home/home_dir')
->identityFile('PATH_TO_SSH_KEY')
->stage('dev')
->set('branch', 'master');

set('repository', 'ssh://git@server:22/vendor/project.git');
// Can be done via http as well.
Expand All @@ -29,8 +37,6 @@
'var/sessions'
]);

inventory(__DIR__ . '/deployer/servers.yml');

// If your PHP executable is installed within a non standard path, use this:
/*set('bin/php', function () {
return '/opt/cpanel/ea-php70/root/usr/bin/php';
Expand Down
9 changes: 3 additions & 6 deletions recipes/npm.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
namespace Deployer;

set('bin/npm', function () {
if (commandExist('npm')) {
return run('which npm')->toString();
}
return false;
return locateBinaryPath('npm');
});

task('npm:install', function () {
Expand All @@ -18,8 +15,8 @@
run("cd {{release_path}} && {{bin/npm}} install");
});
task('npm:production', function() {
run('cd {{release_path}} && {{env_vars}} {{bin/npm}} run build');
run('cd {{release_path}} && {{bin/npm}} run build');
});
task('npm:develop', function() {
run('cd {{release_path}} && {{env_vars}} {{bin/npm}} run dev');
run('cd {{release_path}} && {{bin/npm}} run dev');
});
9 changes: 3 additions & 6 deletions recipes/yarn.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
namespace Deployer;

set('bin/yarn', function () {
if (commandExist('yarn')) {
return run('which yarn')->toString();
}
return false;
return locateBinaryPath('yarn');
});

task('deploy:yarn:install', function() {
run("cd {{release_path}} && {{env_vars}} {{bin/yarn}} install");
run("cd {{release_path}} && {{bin/yarn}} install");
});

task('deploy:yarn:encore', function() {
run("cd {{release_path}} && {{env_vars}} {{bin/yarn}} run encore production");
run("cd {{release_path}} && {{bin/yarn}} run encore production");
});

0 comments on commit 0ee1b24

Please sign in to comment.