capistrano3

Capistrano 3 permissions not set on correctly on cache and releases

早过忘川 提交于 2020-01-07 05:21:12
问题 I am deploying a Symfony2 web application onto Ubuntu 14.04 using Capistrano 3 with symfony gem. Permissions are not set correctly on the cache folder: Because I am using the symfony gem the permissions should get set on the cache folder and indeed I do see this in the output during deploy which is successful: cd /var/www/releases/20151015083314 && ( SYMFONY_ENV=prod /usr/bin/env mkdir -pv app/cache However when I preview my web app i get the following error in my logs PHP Warning: mkdir():

SSH agent forwarding with Capistrano 3 not working when deploying Rails app

放肆的年华 提交于 2020-01-04 09:03:32
问题 I have the following setup in my deploy.rb set :application, 'sample_app' set :repo_url, 'user@123.45.67.100:/home/user/railsapps/sample_app' set :deploy_to, '/var/www/sample_app' set :user, "user" set :ssh_options, { :forward_agent => true } and my deploy/production.rb file: set :stage, :production server '123.45.67.200', user: 'user', roles: %w{app db web} I get the following error when I run cap production deploy:check DEBUG [] ssh: connect to host 123.45.67.100 port 22: Connection timed

How can I use Rails 5.2 credentials in capistrano's deploy.rb file?

强颜欢笑 提交于 2020-01-02 02:24:05
问题 I've just updated my Rails app to 5.2, and configured it to use the new config/credentials.yml.enc file. When I try to deploy, I get this error: NameError: uninitialized constant Rails /Users/me/Documents/project/config/deploy.rb:27:in `<top (required)>' That's pointing to this line in my config/deploy.rb file: set :rollbar_token, Rails.application.credentials[:rollbar_token] So it appears that while capistrano is running, it doesn't have access to Rails.application.credentials . How are you

Starting or restarting Unicorn with Capistrano 3.x

好久不见. 提交于 2019-12-31 09:03:47
问题 I'm trying to start or restart Unicorn when I do cap production deploy with Capistrano 3.0.1. I have some examples that I got working with Capistrano 2.x using something like: namespace :unicorn do desc "Start unicorn for this application" task :start do run "cd #{current_path} && bundle exec unicorn -c /etc/unicorn/myapp.conf.rb -D" end end But when I try and use run in the deploy.rb for Capistrano 3.x I get an undefined method error. Here are a couple of the things I tried: # within the

Is there a way to prevent rails to precompile assets on production?

放肆的年华 提交于 2019-12-31 05:02:06
问题 I have a lot of assets in my project. The precompile task in the server is very slow and exhaust the host (CPU utilization 100%, high average latency). My idea is to precompile all assets in my localhost and send to GIT (master) all files already precompiled. In the deploy action ( cap production deploy ), avoid the precompile task and in the server, prevent any precompile task. The server uses the already precompiled files sended via capistrano , available in GIT. Is it possible? If yes, how

SSHKit::Runner::ExecuteError

可紊 提交于 2019-12-29 03:37:26
问题 $ bundle exec cap production deploy (Backtrace restricted to imported tasks) cap aborted! SSHKit::Runner::ExecuteError: Exception while executing as Psara@sakura: git exit status: 128 git stdout: Nothing written git stderr: Permission denied (publickey). fatal: The remote end hung up unexpectedly SSHKit::Command::Failed: git exit status: 128 git stdout:Nothing written git stderr: Permission denied (publickey). fatal: The remote end hung up unexpectedly Tasks: TOP => git:check (See full trace

capistrano 3 + rvm1-capistrano3 rails 4.1 secrets.yml environmental variables issue

徘徊边缘 提交于 2019-12-25 05:13:36
问题 I have been deploying rails 4.1 application with capistrano 3. it has been working fine. but when i tried to do rake tasks (uncommenting require 'capistrano/rails/assets'). i get this error cap aborted! SSHKit::Runner::ExecuteError: Exception while executing on host xxx.xxx.xxx.xxx: rake exit status: 1 rake stdout: Nothing written rake stderr: config.eager_load is set to nil. Please update your config/environments/*.rb files accordingly: * development - set it to false * test - set it to

rake exit status: 139

不羁的心 提交于 2019-12-24 19:45:22
问题 I am following https://gorails.com/deploy/ubuntu/16.04 I am running : "bundle exec cap production deploy" and getting the following error: 01 $HOME/.rbenv/bin/rbenv exec bundle install --path /home/deploy/deploy_test1/shared/bundle --without development test --deployment --q… ✔ 01 deploy@107.170.84.18 3.251s 00:21 deploy:assets:precompile 01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile 01 /home/deploy/deploy_test1/shared/bundle/ruby/2.4.0/gems/activesupport-4.2.4/lib/active

Rails assets aren't compiling after Capistrano deployment

故事扮演 提交于 2019-12-23 22:01:29
问题 I'm deploying my Rails app using Capistrano and it seems that the assets aren't being compiled unless I ssh into the server and run RAILS_ENV=development bundle exec rake assets:precompile manually. I've tried following the instructions on the capistrano/rails github page, but I'm not sure if I've missed something. Running cap production deploy completes successfully. But I don't know how to check whether the assets:precompile task was actually run. Running cap production deploy:assets

Capistrano v3 - Hook to run command post deploy

一曲冷凌霜 提交于 2019-12-23 12:25:23
问题 I am using Capistrano to deploy to a server running Nginx. I'm running into some issues with APC and I need to reload PHP-FPM after Capistrano has completed the deployment. The issue itself is outlined here but like that author I don't want to have to SSH in and reload PHP-FPM remotely from the command line, I'd like Capistrano to do it as a post deployment hook. The essence of the deploy.rb being used is below; set :application, "deploytest" set :repository, "git@bitbucket.org:gitaccount/git