Created
March 5, 2009 05:44
-
-
Save shayfrendt/74216 to your computer and use it in GitHub Desktop.
This file contains 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
# Callbacks | |
before "deploy:setup", "sqlite3:config" | |
after "deploy:update_code", "sqlite3:symlink" | |
# Tasks | |
namespace :sqlite3 do | |
desc "Configure the shared path to contain a persistent sqlite3 database" | |
task :config do | |
run "mkdir -p #{shared_path}/db" | |
run "touch #{shared_path}/db/production.sqlite3" | |
end | |
desc "Symlink the database file from the shared path to the release path" | |
task :symlink do | |
run "ln -nsf #{shared_path}/db/production.sqlite3 #{release_path}/db/production.sqlite3" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment