I place the set :deploy_to
in each of the stage config 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 can see that this value was not 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 a basic capistrano structure:
├── Capfile
├── config
│ ├── deploy
│ │ ├── production.rb
│ │ └── staging.rb
│ └── deploy.rb
└── lib
└── capistrano
└── tasks
I thought that those stage config files are there to define custom variables for each stage? Which variables can I set in the stage config files?
EDIT:
I'm using capistrano v3
this seems old, but for my case, i was using capistrano3-puma gem.
i realize ive set my puma config in deploy.rb, but my deploy_to is set in staging.rb and production.rb.
adding puma deploy config in 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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With