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
# Gemfile | |
gem 'jammit-s3', :git => 'git://github.com/meskyanichi/jammit-s3.git' | |
# config/assets.yml | |
s3_bucket: mybucket | |
s3_access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %> | |
s3_secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %> | |
s3_permission: public_read | |
embed_assets: on |
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
# This is what people apparently use: | |
ActionMailer::Base.smtp_settings = { | |
:address => 'smtp.sendgrid.net', | |
:port => 25, | |
:domain => 'mysite.com', | |
:authentication => :plain, | |
:user_name => '[email protected]', | |
:password => 'sendgrid_password' | |
} |
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
#! /usr/bin/env ruby | |
Bluepill.application("app_name-production") do |app| | |
app.process("unicorn") do |process| | |
process.pid_file = File.join(RAILS_ROOT, 'tmp', 'pids', 'unicorn.pid') | |
process.working_dir = RAILS_ROOT | |
process.start_command = "/usr/bin/env UNICORN_SERVERS=#{ENV['UNICORN_SERVERS']} #{UNICORN_PATH} -D -c config/unicorn.rb -E production" | |
process.stop_command = "kill -QUIT {{PID}}" | |
process.restart_command = "kill -USR2 {{PID}}" |
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
# encoding: utf-8 | |
# Spawn 3 workers | |
worker_processes ENV['UNICORN_SERVERS'].nil? ? 3 : ENV['UNICORN_SERVERS'].to_i | |
# Restart any workers that haven't responded in 30 seconds | |
timeout 30 | |
# Listen on a Unix data socket | |
listen File.join(ENV['HOME'], 'tmp', 'sockets', 'rails', 'unicorn.sock'), :backlog => 2048 |
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
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
require "rvm/capistrano" | |
set :application, "my_app" | |
set :repository, "[email protected]:myuser/myapp.git" | |
set :branch, "production" | |
set :rvm_ruby_string, "1.9.2" | |
set :deploy_to, "/var/applications/" | |
set :user, "username" |
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
location /faye { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
root /var/applications/current/faye; | |
proxy_pass http://127.0.0.1:4001; # im running faye on port 4001 | |
break; | |
} |
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
gem 'compass', :git => 'https://github.com/chriseppstein/compass.git', :branch => 'rails31' |
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
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
before_filter :secure_with_ssl | |
private | |
def secure_with_ssl | |
if request.subdomain != 'secure' or request.protocol != 'https' | |
redirect_to :subdomain => 'secure', :protocol => 'https' |
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
source 'http://rubygems.org' | |
gem 'rails', '3.1.0.rc4' | |
gem 'sprockets', '!= 2.0.0.beta.11' | |
gem 'haml-rails' | |
gem 'sass-rails' | |
gem 'compass', :git => 'https://github.com/chriseppstein/compass.git', :branch => 'rails31' | |
gem 'coffee-script' | |
gem 'uglifier' | |
gem 'therubyracer' |
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
# encoding: utf-8 | |
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
require 'rvm/capistrano' | |
set :application, "hirefireapp" | |
set :repository, "[email protected]:meskyanichi/myapp.git" | |
set :branch, "develop" | |
set :rvm_ruby_string, "1.9.2" |
OlderNewer