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
--- | |
environment: production | |
chdir: /home/me/webapps/myapp | |
address: 127.0.0.1 | |
user: root | |
group: root | |
port: myport | |
rackup: /home/me/webapps/myapp/config/config.ru | |
log: /home/me/webapps/myapp/thin.log | |
max_conns: 1024 |
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
require 'mypp' | |
run Sinatra::Application |
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
require 'rake' | |
namespace :thin do | |
desc "Start The Application" | |
task :start do | |
puts "Restarting The Application..." | |
system("thin -s 1 -C config/config.yml -R config/config.ru start") | |
end |
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
namespace :deploy do | |
desc "write the crontab file" | |
task :write_crontab, :roles => [:db_admin] do | |
run "cd #{release_path} && sudo -u root whenever --write-crontab #{application}" | |
end | |
end |
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
Add host entry: | |
etc/hosts | |
Add Virtual Host Configuration File: | |
usr/local/apache2/conf/vhosts | |
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
default_run_options[:pty] = true | |
ssh_options[:forward_agent] = true | |
user = 'me' | |
password = "my_password" | |
application = 'me' | |
domain = 'me.com' | |
set :webfaction_port, "my port number goes here" | |
set :webfaction_username, "#{user}" |
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
after "deploy:symlink", "deploy:update_crontab" | |
namespace :deploy do | |
desc "Write Crontab" | |
task :update_crontab, :roles => :app do | |
run "cd #{release_path} && /home/#{user}/ruby1.8/lib/ruby/gems/1.8/bin/whenever --write-crontab" | |
end | |
end |
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
# I ADD THIS TO CAP DEPLOY | |
set :rake, "/home/#{user}/ruby1.8/lib/ruby/gems/1.8/bin/rake" | |
# AND I ADD THIS TO .bash_profile and .bashrc | |
export GEM_PATH=/home/YOUR USERNAME/ruby1.8//lib/ruby/gems/1.8 |
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
desc "Redefine deploy:restart" | |
task :restart, :roles => :app do | |
invoke_command "/home/#{user}/ruby1.8/lib/ruby/gems/1.8/bin/mongrel_rails stop -c #{deploy_to}/current -P /home/#{webfaction_username}/webapps/#{application}/log/mongrel.pid", :via => run_method | |
invoke_command "/home/#{user}/ruby1.8/lib/ruby/gems/1.8/bin/mongrel_rails start -c #{deploy_to}/current -d -e production -P /home/#{webfaction_username}/webapps/#{application}/log/mongrel.pid -p #{webfaction_port}", :via => run_method | |
end |
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
CANADIAN_PROVINCES = [["Alberta","AB"],["British Columbia","BC"],["Manitoba","MB"],["New Brunswick","NB"],["Newfoundland and Labrador","NL"],["Nova Scotia","NS"],["Northwest Territories","NT"],["Nunavut","NU"],["Ontario","ON"],["Prince Edward Island","PE"],["Quebec","QC"],["Saskatchewan","SK"],["Yukon","YT"]] |
OlderNewer