
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
capistrano-linked-files
Advanced tools
This gem provides Capistrano 3.1 reciepes to upload your linked files and
directories. It's quite useful for files such as config/database.yml
and
config/secrets.yml
, which are usually ignored (at least they should be) from
version control systems.
Linked files and directories are placed in the shared
directory on your
remote servers and kept between deployments. After a new deployment, a symlink
is created from the shared
directory to the current
directory.
Inspiration was found in damselem's
capistrano-shared-files,
but capistrano-linked-files uses the "built in" Capistrano configuration
variables linked_files
and linked_dirs
instead of custom ones. This way
it's not necessary to specify your linked files twice.
Add the gem to your Gemfile
:
gem 'capistrano-linked-files'
Or install it to your system:
$ gem install capistrano-linked-files
Add the gem to your Capfile
:
require 'capistrano/linked_files'
In deploy.rb
, list the files and directories you'd like to keep between
deployments:
set :linked_files, %w(config/database.yml config/secrets.yml)
set :linked_dirs, %w(bin log tmp)
Then run the task:
$ bundle exec cap <STAGE> linked_files:upload
By default, the listed files and directories are uploaded to all server roles. You may change this by doing the following:
# Set upload roles using symbols
set :upload_roles, :all
# Set upload roles using arrays
set :upload_roles, %w(web app)
If you only want to upload files or dirs, then run the tasks accordingly:
$ bundle exec cap <STAGE> linked_files:upload_files
$ bundle exec cap <STAGE> linked_files:upload_dirs
To automatically upload linked files and directories after a new deployment,
add the following to your deploy.rb
:
# Uploading both linked_files and dirs
before :finishing, 'linked_files:upload'
# Uploading only linked_files
before :finishing, 'linked_files:upload_files'
# Uploading only dirs
before :finishing, 'linked_files:upload_dirs'
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)The capistrano-linked-files plugin is free software released under the MIT License. See LICENSE for details.
FAQs
Unknown package
We found that capistrano-linked-files demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.