Capistrano deploy_to does not work when configured in stage configuration file

I put set :deploy_to in each of the scene configuration files: config/deploy/production.rb and config/deploy/staging.rb

Example:

 set :deploy_to, '/home/user/htdocs/app-name' 

After running cap staging deploy:check --trace I see that this value has not been applied:

 ... ** Execute deploy:check:directories INFO [91f6713c] Running /usr/bin/env mkdir -pv /var/www/shared /var/www/releases on example.net DEBUG [91f6713c] Command: /usr/bin/env mkdir -pv /var/www/shared /var/www/releases ... 

I use the base capistrano structure:

 ├── Capfile ├── config │ ├── deploy │ │ ├── production.rb │ │ └── staging.rb │ └── deploy.rb └── lib └── capistrano └── tasks 

I thought that these script configuration files exist to define custom variables for each step? What variables can be set in the scene configuration files?

EDIT:

I am using capistrano v3

+6
source share
1 answer

This seems old, but for my case I used capistrano3-puma gem.

I implement ive, set the puma configuration to deploy.rb, but my deploy_to is set to staging.rb and production.rb.

add puma deploy config to staging.rb after deploy_to works!

eg:

 set :deploy_to, "/home/username/rails-stg" set :puma_conf, "#{shared_path}/puma.rb" set :puma_default_control_app, "unix://#{shared_path}/tmp/sockets/pumactl.sock" set :puma_preload_app, true set :puma_bind, %w(tcp://127.0.0.1:3065) 
0
source

Source: https://habr.com/ru/post/959260/


All Articles