chore: add deployer
This commit is contained in:
@@ -99,6 +99,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"deployer/deployer": "^7.5",
|
||||||
"phpunit/phpunit": "^9.5",
|
"phpunit/phpunit": "^9.5",
|
||||||
"symfony/browser-kit": "6.4.*",
|
"symfony/browser-kit": "6.4.*",
|
||||||
"symfony/css-selector": "6.4.*",
|
"symfony/css-selector": "6.4.*",
|
||||||
|
|||||||
Generated
+55
-1
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "e573ad1efa56e3ccee4a3bc80c29334c",
|
"content-hash": "d79e5d8a80d5e98bfd3dadadc9b6182c",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "carbonphp/carbon-doctrine-types",
|
"name": "carbonphp/carbon-doctrine-types",
|
||||||
@@ -7917,6 +7917,60 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
|
{
|
||||||
|
"name": "deployer/deployer",
|
||||||
|
"version": "v7.5.5",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/deployphp/deployer.git",
|
||||||
|
"reference": "1b37d639e0ffad980f6cc3873859b16de29ecad7"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/deployphp/deployer/zipball/1b37d639e0ffad980f6cc3873859b16de29ecad7",
|
||||||
|
"reference": "1b37d639e0ffad980f6cc3873859b16de29ecad7",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-json": "*",
|
||||||
|
"php": "^8.0|^7.3"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.64",
|
||||||
|
"pestphp/pest": "^3.3",
|
||||||
|
"phpstan/phpstan": "^1.4",
|
||||||
|
"phpunit/php-code-coverage": "^11.0",
|
||||||
|
"phpunit/phpunit": "^11.4"
|
||||||
|
},
|
||||||
|
"bin": [
|
||||||
|
"bin/dep"
|
||||||
|
],
|
||||||
|
"type": "library",
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Anton Medvedev",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Deployment Tool",
|
||||||
|
"homepage": "https://deployer.org",
|
||||||
|
"support": {
|
||||||
|
"docs": "https://deployer.org/docs",
|
||||||
|
"issues": "https://github.com/deployphp/deployer/issues",
|
||||||
|
"source": "https://github.com/deployphp/deployer"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/sponsors/antonmedv",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-11-08T13:18:44+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "masterminds/html5",
|
"name": "masterminds/html5",
|
||||||
"version": "2.9.0",
|
"version": "2.9.0",
|
||||||
|
|||||||
+114
@@ -0,0 +1,114 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Deployer;
|
||||||
|
|
||||||
|
require 'contrib/cachetool.php';
|
||||||
|
require 'contrib/rsync.php';
|
||||||
|
require 'recipe/symfony.php';
|
||||||
|
|
||||||
|
add('shared_dirs', [
|
||||||
|
'var/log',
|
||||||
|
'var/sessions',
|
||||||
|
'var/xmlexport',
|
||||||
|
]);
|
||||||
|
|
||||||
|
add('shared_files', [
|
||||||
|
'public/.htaccess',
|
||||||
|
'.env.local.php',
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Rsync options, mainly files/dirs to exclude
|
||||||
|
$rsyncOptions = [
|
||||||
|
'exclude' => [
|
||||||
|
'.idea',
|
||||||
|
'.vscode',
|
||||||
|
'.DS_Store',
|
||||||
|
'.ddev',
|
||||||
|
'.git',
|
||||||
|
'.github',
|
||||||
|
'node_modules',
|
||||||
|
'.editorconfig',
|
||||||
|
'.env.dev.local',
|
||||||
|
'.env.dev.local.php',
|
||||||
|
'.env.test',
|
||||||
|
'.env.test.local',
|
||||||
|
'.gitignore',
|
||||||
|
'.nvmrc',
|
||||||
|
'.php-cs-fixer.cache',
|
||||||
|
'.php-cs-fixer.dist.php',
|
||||||
|
'.phpunit.result.cache',
|
||||||
|
'deploy.php',
|
||||||
|
'package.json',
|
||||||
|
'package-lock.json',
|
||||||
|
'*.http',
|
||||||
|
'postcss.config.js',
|
||||||
|
'phpunit.xml.dist',
|
||||||
|
'public/.htaccess',
|
||||||
|
'tailwind.config.js',
|
||||||
|
'webpack.config.js',
|
||||||
|
'rapidapi.paw',
|
||||||
|
'bin/.phpunit',
|
||||||
|
'temp/',
|
||||||
|
'tests/',
|
||||||
|
'uploads/',
|
||||||
|
'xmlexport/',
|
||||||
|
'var/',
|
||||||
|
],
|
||||||
|
'exclude-file' => false,
|
||||||
|
'include' => [],
|
||||||
|
'include-file' => false,
|
||||||
|
'filter' => [],
|
||||||
|
'filter-file' => false,
|
||||||
|
'filter-perdir' => false,
|
||||||
|
'flags' => 'rz',
|
||||||
|
'options' => ['delete', 'copy-links', 'chmod=D755,F664'],
|
||||||
|
'timeout' => 300,
|
||||||
|
];
|
||||||
|
|
||||||
|
host('prod')
|
||||||
|
->setHostname('92.205.212.39')
|
||||||
|
->setRemoteUser('ssh-53857-root')
|
||||||
|
->setForwardAgent(true)
|
||||||
|
->setSshMultiplexing(true)
|
||||||
|
->setDeployPath('/kunden/tiefschnee.de/myep-next')
|
||||||
|
->set('writable_mode', 'chmod')
|
||||||
|
->set('http_user', 'ssh-53857-root')
|
||||||
|
->set('bin/php', '/usr/bin/php81')
|
||||||
|
->set('rsync_src', __DIR__)
|
||||||
|
->set('rsync', $rsyncOptions)
|
||||||
|
->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{release_or_current_path}}/public/ --web-url=https://myep-next.ep-reisen.de')
|
||||||
|
;
|
||||||
|
|
||||||
|
host('develop')
|
||||||
|
->setHostname('185.243.132.170')
|
||||||
|
->setRemoteUser('p546473')
|
||||||
|
->setForwardAgent(true)
|
||||||
|
->setSshMultiplexing(true)
|
||||||
|
->setDeployPath('/home/www/p546473/html/myep-next')
|
||||||
|
->set('writable_mode', 'chmod')
|
||||||
|
->set('bin/php', '/usr/local/bin/php')
|
||||||
|
->set('rsync_src', __DIR__)
|
||||||
|
->set('rsync', $rsyncOptions)
|
||||||
|
->set('keep_releases', 5)
|
||||||
|
->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{release_or_current_path}}/public/ --web-url=https://myep-next.dreipunktnull.net')
|
||||||
|
;
|
||||||
|
|
||||||
|
task('deploy', [
|
||||||
|
'deploy:info',
|
||||||
|
'deploy:setup',
|
||||||
|
'deploy:lock',
|
||||||
|
'deploy:release',
|
||||||
|
'rsync',
|
||||||
|
'deploy:shared',
|
||||||
|
'deploy:writable',
|
||||||
|
// 'database:migrate',
|
||||||
|
'deploy:publish',
|
||||||
|
'cachetool:clear:opcache',
|
||||||
|
// 'deploy:stop-workers',
|
||||||
|
]);
|
||||||
|
|
||||||
|
task('deploy:stop-workers', function () {
|
||||||
|
run('{{bin/console}} messenger:stop-workers');
|
||||||
|
});
|
||||||
|
|
||||||
|
after('deploy:failed', 'deploy:unlock');
|
||||||
Reference in New Issue
Block a user