Source code for cock.li
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

deploy.rb 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # config valid only for current version of Capistrano
  2. lock '3.5.0'
  3. set :application, 'cock.li'
  4. set :repo_url, 'git.cock.li:cock.li.git'
  5. # Default branch is :master
  6. # ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
  7. # Default deploy_to directory is /var/www/my_app_name
  8. set :deploy_to, "/var/www/#{fetch(:application)}/cap"
  9. # Default value for :scm is :git
  10. # set :scm, :git
  11. # Default value for :format is :pretty
  12. # set :format, :pretty
  13. # Default value for :log_level is :debug
  14. # set :log_level, :debug
  15. # Default value for :pty is false
  16. # set :pty, true
  17. # Default value for :linked_files is []
  18. set :linked_files, fetch(:linked_files, []).push('.env','storage/laravel.log')
  19. # Default value for linked_dirs is []
  20. # set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system')
  21. set :linked_dirs, fetch(:linked_dirs, []).push('public/transparency','public/donations','storage/app','storage/logs','storage/framework','public/.well-known')
  22. # Default value for default_env is {}
  23. # set :default_env, { path: "/opt/ruby/bin:$PATH" }
  24. # Default value for keep_releases is 5
  25. # set :keep_releases, 5
  26. namespace :deploy do
  27. after :updated, :composer do
  28. on roles(:web) do
  29. within release_path do
  30. execute :composer, :install
  31. end
  32. end
  33. end
  34. after :updated, :db_backup do
  35. on roles(:web) do
  36. within release_path do
  37. execute :mysqldump, :mail, "-r ~/mail.sql"
  38. end
  39. end
  40. end
  41. after :db_backup, :migrate do
  42. on roles(:web) do
  43. within release_path do
  44. execute :php, :artisan, :migrate, "--force"
  45. end
  46. end
  47. end
  48. end