Commit 556e5ae9 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

Adjust deployment and add maintenance mode

parent d0da8e53
Pipeline #10320 passed with stages
in 7 minutes and 35 seconds
......@@ -76,6 +76,18 @@ task('cache', function () {
run('cd {{release_path}} && {{php}} {{bin_folder}}cachetool opcache:reset');
});
task('maintenance:activate', function () {
run('echo "return 503;" > ~/cnf/nginx-{{deploy_type}}.conf');
run('sudo /usr/sbin/service php74-t3o-{{deploy_type}} restart');
run('sudo /usr/sbin/service nginx reload');
});
task('maintenance:deactivate', function () {
run('rm ~/cnf/nginx-{{deploy_type}}.conf');
run('sudo /usr/sbin/service php74-t3o-{{deploy_type}} restart');
run('sudo /usr/sbin/service nginx reload');
});
task('deploy', [
'deploy:prepare',
'deploy:release',
......@@ -83,7 +95,9 @@ task('deploy', [
'rsync',
'deploy:shared',
'deploy:writable',
'maintenance:activate',
'typo3',
'maintenance:deactivate',
'deploy:symlink',
'solr_host',
'typo3_cache',
......
......@@ -6,6 +6,7 @@ main:
forward_agent: true
deploy_path: ~/ci
keep_releases: 2
deploy_type: prod
develop:
stage: develop
hostname: typo3.dev
......@@ -14,3 +15,4 @@ develop:
forward_agent: true
deploy_path: ~/ci
keep_releases: 2
deploy_type: stage
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