PageRenderTime 21ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/config/deploy.rb

https://bitbucket.org/teufels/hive_boilerplate_v2
Ruby | 69 lines | 30 code | 11 blank | 28 comment | 1 complexity | 08e6b175071d9b8008c4a7704255c6ca MD5 | raw file
  1. # config valid only for current version of Capistrano
  2. lock '3.5.0'
  3. set :application, "<customer_abbr>_<yy>_<type>-deploy"
  4. ##
  5. ## :repo_url
  6. ##
  7. ## e.g. set :repo_url, 'git@bitbucket.org:teufels/teu_18_ws_installer.git'
  8. ##
  9. set :repo_url, "git@bitbucket.org:<team>/<customer_abbr>_<yy>_<type>_installer.git"
  10. set :branch, ENV['REVISION'] || ENV['BRANCH_NAME']
  11. namespace :deploy do
  12. task :composer do
  13. on roles(:web) do
  14. within release_path do
  15. execute :chmod, '-R', '775', './web'
  16. execute :chmod, '-R', '775', './composer.json'
  17. execute "echo '#{fetch(:teufels_database_ini)}'"
  18. execute 'wget', '-q', '-nc', 'https://getcomposer.org/composer.phar'
  19. execute "#{fetch(:teufels_php_cli_bin)}", "-c", "./php.ini" , './composer.phar', 'install', '--no-dev', '--no-ansi', '--no-interaction'
  20. ####################################################################################################################
  21. ##
  22. ## Uncomment if not using PHP with CGI !!!
  23. ##
  24. #execute :mv, "./web/index.php", "./web/_index.php"
  25. #execute :cp, "./vendor/typo3/cms/index.php", "./web"
  26. ##
  27. ####################################################################################################################
  28. execute :ln, "-s", "#{fetch(:teufels_database_ini)}", "./web/typo3conf/server.ini"
  29. execute :ln, "-s", "#{fetch(:teufels_sudo_ini)}", "./sudo.ini"
  30. ####################################################################################################################
  31. ##
  32. ## Add shared folders below !!!
  33. ##
  34. execute :ln, "-s", "#{fetch(:teufels_fileadmin)}", "./web/fileadmin"
  35. execute :ln, "-s", "#{fetch(:teufels_uploads)}", "./web/uploads"
  36. ##
  37. ####################################################################################################################
  38. execute :sh, "./install_typo3.sh"
  39. # ./temp_defaults-extra-file.cnf created has been created in ./install_typo3.sh
  40. execute :mysql, "--defaults-extra-file=./temp_defaults-extra-file.cnf", "--default-character-set=utf8", "<", "#{fetch(:teufels_database_dump_definition)}"
  41. execute :mysql, "--defaults-extra-file=./temp_defaults-extra-file.cnf", "--default-character-set=utf8", "<", "#{fetch(:teufels_database_dump_data)}"
  42. execute :sh, "./install_typo3_extensions.sh"
  43. execute :sh, "./install_npm_packages.sh"
  44. execute "#{fetch(:teufels_node_modules_bin)}/gulp"
  45. execute :rm, "-f", "./temp_defaults-extra-file.cnf"
  46. ####################################################################################################################
  47. ##
  48. ## Uncomment if using PHP with opcache enabled !!!
  49. ##
  50. #execute "#{fetch(:teufels_php_bin)}", "-c", "./php.ini" , './opcache_reset.php'
  51. ##
  52. ####################################################################################################################
  53. execute :touch, "./web/typo3conf/ENABLE_INSTALL_TOOL"
  54. end
  55. end
  56. end
  57. after :updated, 'deploy:composer'
  58. end