Skip to content

Instantly share code, notes, and snippets.

@tazeverywhere
Last active May 3, 2019 16:19
Show Gist options
  • Save tazeverywhere/cbafe7a01682b24b642dad4bf8e285b0 to your computer and use it in GitHub Desktop.
Save tazeverywhere/cbafe7a01682b24b642dad4bf8e285b0 to your computer and use it in GitHub Desktop.
Deployer extended for typo3 - file `deploy.php` with infomaniak shared hosting. @see https://github.com/sourcebroker/deployer-extended-typo3 for full config & install
<?php
namespace Deployer;
require_once(__DIR__ . '/vendor/sourcebroker/deployer-loader/autoload.php');
new \SourceBroker\DeployerExtendedTypo3\Loader();
set('repository', 'git@git.yourdomain.git:yourgroup/yourepo.git');
set('http_user', 'uidXXXXX'); // @see infomaniak http-user (owner)
// @NOTE: put .bashrc with "source ~/.profile" into, at root infomaniak to be able to read alias and $PATH info (ex: php-cli path)
set('ssh_type', 'native');
set('use_relative_symlinks', false);
set('ssh_multiplexing', false);
set('bin/php', '/opt/php7.1/bin/php');
set('bin/composer', 'php -d allow_url_fopen=on /home/clients/REALPATHHERE/composer.phar'); // @see infomaniak for realpath
set('composer_options', '{{composer_action}}');
set('web_path', 'web');
set(
'shared_dirs',
[
'{{web_path}}/fileadmin',
'{{web_path}}/uploads',
'{{web_path}}/typo3temp',
]
);
set('shared_files', [
'.env',
'{{web_path}}/.htaccess'
]);
set(
'media',
[
'filter' => [
'+ */',
'+ {{web_path}}/fileadmin/',
'+ {{web_path}}/fileadmin/**',
'+ {{web_path}}/uploads/',
'+ {{web_path}}/uploads/**',
'- *'
]
]
);
// Look on https://github.com/sourcebroker/deployer-extended#buffer-start for docs
set(
'buffer_config',
[
'index.php' => [
'entrypoint_filename' => '{{web_path}}/index.php',
]
]
);
server('live', 'YOURPRODFTPSERVER.ch')
->user('YOURSSHUSER')
->set('branch', 'master')
->set('deploy_path', '/home/clients/YOURFULLPATH/web/prod')
->set('public_urls', ['https://base.example.com']);
server('stage', 'YOURSTAGEFTPSERVER.com')
->user('YOURSSHUSER')
->set('branch', 'staging')
->set('deploy_path', '/home/clients/YOURFULLPATH/web/stage')
->set('public_urls', ['https://stage.example.com']);
server('local', '192.168.94.100')
->set('deploy_path', getcwd())
->set('vhost_nocurrent', true)
->set('public_urls', ['https://mysite.test']);
// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment