Skip to content

Instantly share code, notes, and snippets.

@ekandreas
Last active April 26, 2021 22:04
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ekandreas/fbad54c8673559c76d03 to your computer and use it in GitHub Desktop.
Save ekandreas/fbad54c8673559c76d03 to your computer and use it in GitHub Desktop.
Deploy example PHP Deployer
<?php
/*** step 1 ***/
date_default_timezone_set('Europe/Stockholm');
/*** step 2 ***/
include_once 'vendor/deployer/deployer/recipe/common.php';
/*** step 3 ***/
server( 'production', 'andreasek.se', 22 )
->env('deploy_path','/mnt/persist/www/aekab.se')
->user( 'root' )
->env('branch', 'master')
->stage('production')
->identityFile();
/*** step 4 ***/
set('repository', 'git@github.com:ekandreas/aekab.git');
/*** step 5 ***/
set('env', 'prod');
set('keep_releases', 10);
set('shared_dirs', ['web/app/uploads']);
set('shared_files', ['.env']);
set('env_vars', '/usr/bin/env');
/*** step 6 ***/
task( 'deploy', [
'deploy:prepare',
'deploy:release',
'deploy:update_code',
'deploy:vendors',
'deploy:shared',
'deploy:symlink',
'cleanup',
'success'
] )->desc( 'Deploy your Bedrock project, eg dep deploy production' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment