I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| namespace :load do | |
| task :defaults do | |
| set :pids_dir, -> { File.join(current_path, 'tmp', 'pids') } | |
| set :unicorn_pid, -> { File.join(fetch(:pids_dir), "unicorn.pid") } | |
| set :unicorn_config_path, -> { File.join(current_path, "config", "unicorn", "#{fetch(:rails_env)}.rb") } | |
| set :unicorn_roles, -> { :app } | |
| set :unicorn_options, -> { "" } | |
| set :unicorn_rack_env, -> { fetch(:rails_env) == "development" ? "development" : "deployment" } | |
| set :unicorn_restart_sleep_time, 3 | |
| end |
| namespace :figaro do | |
| desc "SCP transfer figaro configuration to the shared folder" | |
| task :setup do | |
| on roles(:app) do | |
| upload! "config/application.yml", "#{shared_path}/application.yml", via: :scp | |
| end | |
| end | |
| desc "Symlink application.yml to the release path" | |
| task :symlink do |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| class Attachment < ActiveRecord::Base | |
| belongs_to :attachable, :polymorphic => true | |
| mount_uploader :item, AttachmentUploader | |
| # background the storage of files to AWS and processing | |
| # makes for fast uploads! | |
| store_in_background :item | |
| attr_accessible :item | |
| before_save :update_attachment_attributes |
| #!/usr/bin/env bash | |
| apt-get -y update | |
| apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev lib64readline-gplv2-dev libyaml-dev | |
| cd /tmp | |
| wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
| tar -xvzf ruby-1.9.3-p194.tar.gz | |
| cd ruby-1.9.3-p194/ | |
| ./configure --prefix=/usr/local | |
| make | |
| make install |
| unicorn.rb | |
| ----------------------------------- | |
| application = "jarvis" | |
| remote_user = "vagrant" | |
| env = ENV["RAILS_ENV"] || "development" | |
| RAILS_ROOT = File.join("/home", remote_user, application) | |
| worker_processes 8 | |
| timeout 30 |
| # Run with: rake environment elasticsearch:reindex | |
| namespace :elasticsearch do | |
| desc "re-index elasticsearch" | |
| task :reindex => :environment do | |
| klass = Place | |
| ENV['CLASS'] = klass.name | |
| ENV['INDEX'] = new_index = klass.tire.index.name << '_' << Time.now.strftime('%Y%m%d%H%M%S') |