From c188a19a167b2ea0b9638e4a13318ab349a057c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Fri, 13 Aug 2021 14:17:52 +0200 Subject: [PATCH] Add staging environment to deployer config --- deploy.php | 80 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 32 deletions(-) diff --git a/deploy.php b/deploy.php index 87da0d26..40d040bd 100644 --- a/deploy.php +++ b/deploy.php @@ -23,6 +23,39 @@ add('shared_dirs', [ 'config/sites', ]); +$rsyncOptions = [ + 'exclude' => [ + '.ddev', + '.DS_Store', + '.git', + '.github', + '.idea', + 'node_modules', + 'public/fileadmin', + 'public/typo3temp', + 'public/uploads', + 'var', + '.editorconfig', + '.gitignore', + '.htaccess_prod', + 'deploy.php', + 'package.json', + 'package-lock.json', + 'postcss.config.js', + 'tailwind.config.js', + 'webpack.config.js', + ], + 'exclude-file' => false, + 'include' => [], + 'include-file' => false, + 'filter' => [], + 'filter-file' => false, + 'filter-perdir' => false, + 'flags' => 'rz', + 'options' => ['delete', 'links'], + 'timeout' => 300, +]; + host('185.237.67.190') ->stage('production') ->user('p546128') @@ -33,41 +66,24 @@ host('185.237.67.190') ->set('http_user', 'p546128') ->set('bin/composer', '/usr/local/bin/composer') ->set('rsync_src', __DIR__) - ->set('rsync', [ - 'exclude' => [ - '.ddev', - '.DS_Store', - '.git', - '.github', - '.idea', - 'node_modules', - 'public/fileadmin', - 'public/typo3temp', - 'public/uploads', - 'var', - '.editorconfig', - '.gitignore', - '.htaccess_prod', - 'deploy.php', - 'package.json', - 'package-lock.json', - 'postcss.config.js', - 'tailwind.config.js', - 'webpack.config.js', - ], - 'exclude-file' => false, - 'include' => [], - 'include-file' => false, - 'filter' => [], - 'filter-file' => false, - 'filter-perdir' => false, - 'flags' => 'rz', - 'options' => ['delete', 'links'], - 'timeout' => 300, - ]) + ->set('rsync', $rsyncOptions) ->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{release_path}}/public/ --web-url=https://www.ep-reisen.de') ; +host('185.237.67.190') + ->stage('staging') + ->user('p546128') + ->forwardAgent() + ->multiplexing() + ->set('deploy_path', '/home/www/p546128/html/{{application}}-staging') + ->set('bin/php', '/usr/local/bin/php') + ->set('http_user', 'p546128') + ->set('bin/composer', '/usr/local/bin/composer') + ->set('rsync_src', __DIR__) + ->set('rsync', $rsyncOptions) + ->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{release_path}}/public/ --web-url=https://staging.ep-reisen.de') +; + task('deploy', [ 'deploy:info', 'deploy:prepare',