capistrano3

Capistrano deploy to different path on same server

若如初见. 提交于 2019-12-23 12:14:37
问题 I am trying to deploy my application using capistrano. But I want to deploy my application to multiple paths of the same server.For example If for the first run I want to deploy it to below path set :deploy_to, '/home/a/some_path/ Once completed the first one it should run for the second path that will be set :deploy_to, '/home/b/some_path/ and so on. Any suggestions how can I achieve this? Right now my single path deployment path is working AOK. 回答1: In your config file: set :deploy_to, ENV[

Capistrano 3.0 — How securely prompt for password now?

三世轮回 提交于 2019-12-23 07:46:39
问题 Prior to 3.0 there was a way to do that: # ... set :mysql_password, proc { Capistrano::CLI.password_prompt "Gimme remote database server password. Don't worry, I won't tell anyone: " } # ... namespace :db do desc 'Dump remote database' task :dump do run "mysqldump -u #{mysql_user} -p #{mysql_database} > ~/#{mysql_database}.sql" do |channel, stream, data| if data =~ /^Enter password:/ channel.send_data "#{mysql_password}\n" end end end end It prompts for password, doesn't show it as you type

CSS doesn't load in production - everything fine in dev (Rails 4.1, Capistrano 3; bootstrap), update: nginx config issue

喜欢而已 提交于 2019-12-22 14:58:31
问题 Problem is as follows: Everything works fine in development, but when I deploy my rails app to production, the site works in plain html, but CSS (bootstrap) doesn't get loaded (JS probably also not). Sorry, I looked for 2 days at ~15 possible solutions and could not make it work... Update: After following @rich-peck's advice, it looks like it's a server issue. Updated with nginx config My setup: Ruby 2.1.2, Rails 4.1 Rbenv mysql2 as db Bootstrap 3 Ubuntu 14.04 on Server with nginx and

Rails Capistrano 3 - how to share production.log file into the shared folder of Capistrano?

╄→尐↘猪︶ㄣ 提交于 2019-12-21 23:26:06
问题 I'm using Capistrano 3 for deployment with my Rails app. The problem is that every time I deploy my app to the server the ./log/production.log file is reset. I've heard it's possible to have the production.log file into the shared folder and being appended at each deployment. I thought this was made by default by Capistrano but apparently not for me :( Any thoughts? Thanks! 回答1: In your config/deploy.rb you need a line similar to this: set :linked_dirs, %w{log public/system} This will tell

Rails 4 + Capistrano 3 : fatal: Could not read from remote repository while deploying

心不动则不痛 提交于 2019-12-20 10:36:39
问题 I am getting following error while deploying Rails 4 application using Capistrano 3 INFO [87512eb8] Running /usr/bin/env chmod +x /tmp/magnificent/git-ssh.sh as deploy@104.236.6.180 DEBUG [87512eb8] Command: /usr/bin/env chmod +x /tmp/magnificent/git-ssh.sh INFO [87512eb8] Finished in 0.444 seconds with exit status 0 (successful). INFO [1ec94dd1] Running /usr/bin/env git ls-remote --heads git@github.com:BoTreeConsultingTeam/magnificent.git as deploy@104.236.6.180 DEBUG [1ec94dd1] Command: (

cap deploy + rbenv: bundle: command not found

╄→尐↘猪︶ㄣ 提交于 2019-12-20 04:57:06
问题 I am following https://gorails.com/deploy/ubuntu/16.04 I am running : "bundle exec cap production deploy" and getting the following error: ✔ 10 deploy@107.170.84.18 0.289s 00:21 bundler:install 01 $HOME/.rbenv/bin/rbenv exec bundle install --path /home/deploy/deploy_test1/shared/bundle --without development test --deployment --q… 01 rbenv: bundle: command not found 01 01 The `bundle' command exists in these Ruby versions: 01 2.4.0 01 (Backtrace restricted to imported tasks) cap aborted!

How to integrate Capistrano with Docker for deployment?

最后都变了- 提交于 2019-12-18 14:09:24
问题 I am not sure my question is relevant as I may try to mix tools (Capistrano and Docker) that should not be mixed. I have recently dockerized an application that is deployed with Capistrano. Docker compose is used both for development and staging environments. This is how my project looks like (the application files are not shown): Capfile docker-compose.yml docker-compose.staging.yml config/ deploy.rb deploy staging.rb The Docker Compose files creates all the necessary containers (Nginx, PHP,

run rails applicaton after capistrano deployment

北城以北 提交于 2019-12-12 23:44:16
问题 Deploying rails app throw Capistrano first time : I deployed my rails app on another machine (server) File structure for rails app ## this is my server akshay@akshay:/var/www/model_demo$ ls current releases repo revisions.log shared cap -T ## showing a lots of rake task like cap deploy:migrate # Runs rake db:migrate if migrations are set If I run this task it is not working saying Stage not set, please call something such as `cap production deploy`, where production is a stage you have

/usr/bin/env: ln: Too many levels of symbolic links

♀尐吖头ヾ 提交于 2019-12-12 11:12:51
问题 This problem is killing me and I feel like I've tried everything. First off, the problem started happening when upgrading to Capistrano 3. Capistrano now utilizes /usr/bin/env before every command when deploying, to make sure the environment setup is correct. When Capistrano goes to create symlinks to the necessary shared directory and respective files, it attempts commands like: /usr/bin/env ln -s /full/path /different/full/path ...and then it errors out: /usr/bin/env: ln: Too many levels of

Capistrano 3: bundler not recognized when running custom shell command

有些话、适合烂在心里 提交于 2019-12-12 02:01:20
问题 I'm having an issue implementing Capistrano deployment with jruby on RVM. I'm using PUMA as app server and that requires me to add capistrano3-puma in my Gemfile. All in all, everything seems to work perfectly, my server's code got up-to-date fine from the git repo, and had the previous version of code archived nicely. Except, every time I try to run shell command from Capistrano task, such as, "bundle exec pumactl -F config/puma.rb start", for example, Capistrano can't seem to recognise