Commit 77755df3 authored by Thomas Löffler's avatar Thomas Löffler

Add cachetool for deployment

* Uses deployer v5
* Uses cachetool recipe
parent ea56f2dd
Pipeline #3210 failed with stages
in 3 minutes and 10 seconds
...@@ -58,7 +58,7 @@ layout: ...@@ -58,7 +58,7 @@ layout:
.deploy-template: &deploy_template .deploy-template: &deploy_template
stage: deploy stage: deploy
image: image:
name: "torvitas/deployer:4.0.0-alpine" name: "torvitas/deployer:5-alpine"
entrypoint: [""] entrypoint: [""]
before_script: before_script:
- mkdir -p /root/.ssh/ - mkdir -p /root/.ssh/
......
...@@ -4,6 +4,7 @@ namespace Deployer; ...@@ -4,6 +4,7 @@ namespace Deployer;
require_once '/composer/vendor/deployer/deployer/recipe/common.php'; require_once '/composer/vendor/deployer/deployer/recipe/common.php';
require_once '/composer/vendor/deployer/recipes/rsync.php'; require_once '/composer/vendor/deployer/recipes/rsync.php';
require_once '/composer/vendor/deployer/recipes/cachetool.php';
$sharedDirectories = [ $sharedDirectories = [
'html/fileadmin', 'html/fileadmin',
...@@ -50,12 +51,18 @@ set('rsync', [ ...@@ -50,12 +51,18 @@ set('rsync', [
]); ]);
set('rsync_src', './'); set('rsync_src', './');
set('keep_releases', 10); set('keep_releases', 10);
serverList('./.gitlab-ci/deployer/servers.yml'); inventory('./.gitlab-ci/deployer/servers.yml');
task('typo3', function() { task('typo3', function() {
run('cd {{release_path}} && /opt/php/php70/bin/php bin/typo3cms install:extensionsetupifpossible'); run('cd {{release_path}} && /opt/php/php70/bin/php bin/typo3cms install:extensionsetupifpossible');
}); });
host('production')->set('cachetool', '/var/run/php7-fpm-extensions.sock');
host('stage')->set('cachetool', '/var/run/php7-fpm-extensionsstage.sock');
task('opcache', function() {
});
task('deploy', [ task('deploy', [
'deploy:prepare', 'deploy:prepare',
'deploy:release', 'deploy:release',
...@@ -64,6 +71,7 @@ task('deploy', [ ...@@ -64,6 +71,7 @@ task('deploy', [
'deploy:shared', 'deploy:shared',
'deploy:writable', 'deploy:writable',
'deploy:symlink', 'deploy:symlink',
'cachetool:clear:opcache',
'cleanup', 'cleanup',
'typo3' 'typo3'
]); ]);
master: master:
stage: production
host: extensions.typo3.org host: extensions.typo3.org
port: 22192 port: 22192
user: extensions user: extensions
forward_agent: true forward_agent: true
deploy_path: ~/ci/ deploy_path: ~/ci/
develop: develop:
stage: stage
host: extensions-stage.typo3.org host: extensions-stage.typo3.org
port: 22191 port: 22191
user: extensionsstage user: extensionsstage
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment