Created
February 5, 2019 12:00
-
-
Save juizmill/d31af6ce0cb4a811c5fec8163573ff46 to your computer and use it in GitHub Desktop.
Arquivo de deploy Laravel na hospedagem KingHost servidor Linux
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; | |
| require 'recipe/laravel.php'; | |
| set('application', 'Nome do APP'); | |
| //set('default_stage', 'production'); | |
| set('branch', 'master'); | |
| // Project repository | |
| set('repository', 'caminho do projeto no GIT remoto'); | |
| // [Optional] Allocate tty for git clone. Default value is false. | |
| set('git_tty', false); | |
| set('bin/php', function () { | |
| return '/usr/local/php/7.3/bin/php'; //Caminho do executavel do PHP na Hospedagem | |
| }); | |
| set('use_atomic_symlink', true); | |
| set('http_user', 'abc'); // usuario da hospedagem | |
| set('http_group', 'abc'); // grupo da hospedagem geralmente é o mesmo nome do usuario | |
| // Shared files/dirs between deploys | |
| add('shared_files', [ | |
| ]); | |
| add('shared_dirs', [ | |
| ]); | |
| // Writable dirs by web sreerver | |
| add('writable_dirs', []); | |
| // Hosts | |
| host('endereço alternativo que a hospedagem oferece') | |
| ->user('nome de usuario') | |
| ->port(22) | |
| ->multiplexing(false) | |
| ->set('deploy_path', '/home/nome de usuario') | |
| ->stage('production'); | |
| task('link_to_www', function () { | |
| run('rm -rf {{deploy_path}}/www/*'); | |
| run('ln -s {{deploy_path}}/current/public/* {{deploy_path}}/www'); | |
| }); | |
| after('cleanup', 'link_to_www'); | |
| after('deploy:failed', 'deploy:unlock'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment