Last active
January 26, 2023 17:36
-
-
Save alexander-schranz/acf8560b6121e395f8a7399dcc3f77fc to your computer and use it in GitHub Desktop.
Deployer deploy.php without Git Repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Deployer; | |
| use Deployer\Task\GroupTask; | |
| require 'recipe/sulu.php'; | |
| require 'contrib/rsync.php'; | |
| host('example.org') | |
| ->set('remote_user', 'deploy') | |
| ->set('deploy_path', '/var/data/websites/example') | |
| ->set('rsync_src', __DIR__) | |
| ->set('rsync_dest','{{release_path}}'); | |
| set('composer_options', '--verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --apcu-autoloader --no-scripts'); | |
| after('deploy:failed', 'deploy:unlock'); | |
| set('rsync', [ | |
| 'exclude' => [ | |
| '.git', | |
| '.DS_Store', | |
| '.idea', | |
| 'deploy.php', | |
| 'node_modules', | |
| 'assets', | |
| 'vendor', | |
| 'var', | |
| '.env.local', | |
| '.env.*.local', | |
| 'tests', | |
| '.php_cs.dist', | |
| 'docker-compose.yml', | |
| 'docker-compose.override.yml', | |
| 'phpstan.neon', | |
| 'phpunit.xml.dist', | |
| 'package.json', | |
| 'postcss.config.js', | |
| 'tailwind.config.js', | |
| 'webpack.config.js', | |
| 'yarn.lock', | |
| '.php-version', | |
| ], | |
| // defaults see: https://github.com/deployphp/deployer/issues/2890 | |
| 'exclude-file' => false, | |
| 'include' => [], | |
| 'include-file' => false, | |
| 'filter' => [], | |
| 'filter-file' => false, | |
| 'filter-perdir' => false, | |
| 'flags' => 'rz', // Recursive, with compress | |
| 'options' => ["delete"], | |
| ]); | |
| task('deploy:update_code')->disable(); | |
| after('deploy:update_code', 'rsync'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment