Skip to content

Instantly share code, notes, and snippets.

@coffeencoke
Created May 17, 2012 19:18
Show Gist options
  • Save coffeencoke/2721066 to your computer and use it in GitHub Desktop.
Save coffeencoke/2721066 to your computer and use it in GitHub Desktop.
Use capistrano to symlink you shared files, don't build a wheel inside of the car while you're driving the car
# WHY? Capistrano has already made this super easy for us to do, AND,
# capistrano is already doing this for us for pids, log, and system files.
desc "Create socket file symlink for nginx"
task :symlink_sockets, :except => {:no_release => true} do
run "mkdir -p #{shared_path}/sockets"
run "ln -s #{shared_path}/sockets #{release_path}/tmp/sockets"
end
# utilize that capistrano has already done this!
#
# If you put your shared file or folder here:
# /path/to/app/shared/sockets
# Then it will be symlinked here:
# /path/to/app/releases/20120517191233/tmp/sockets
#
shared_children.push "tmp/sockets"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment