Created
May 17, 2012 19:18
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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