pinoyskul
pinoyskul

Reputation: 153

How do I change the temporary directory that Capistrano uses?

How would I change the temporary dir that Capistrano uses?

Example: Instead of /tmp, I want to use /home/user/tmp

My current VPS has /tmp mounted as noexec, which gives me permission denied errors while trying to run cap production deploy.

Upvotes: 14

Views: 5774

Answers (3)

Mehdi Yedes
Mehdi Yedes

Reputation: 2375

For the ones who are still using Capistrano 2, tmp_dir does not exist. However you can use copy_dir instead:

set :copy_dir, '/home/user/tmp'

Link to the source code: https://github.com/capistrano/capistrano/blob/legacy-v2/lib/capistrano/recipes/deploy/strategy/copy.rb#L275

Upvotes: 0

Waiting for Dev...
Waiting for Dev...

Reputation: 13037

In Capistrano 3,

set :tmp_dir, '/home/user/tmp'

Upvotes: 25

Vincent
Vincent

Reputation: 4933

Are you talking about the remote tmp directory? If yes, here an example::

set :copy_remote_dir, deploy_to

This will change the default tmp directory where the archive was copied on the remote server to the deployment directory instead.

Upvotes: 7

Related Questions