Skip to content

Instantly share code, notes, and snippets.

@gsohoni
gsohoni / apache_passenger_wordpress.conf
Created March 29, 2011 19:54
General configuration for making wordpress work along with rails app on passenger
<VirtualHost *>
ServerName victorcode.com
ServerAlias www.victorcode.com
DocumentRoot /path/to/rails_apps/app/public
<Directory /path/to/rails_apps/app/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
allow from all
</Directory>
@gsohoni
gsohoni / Capistrano-Deployment-Recipe.rb
Created May 30, 2012 22:24 — forked from mrrooijen/Capistrano-Deployment-Recipe.rb
a "base" Capistrano Rails Deployment Recipe. Use it to deploy your Rails application. It is also easily expandable. So feel free to grab this Recipe and add your own tasks/customization!
# Guide
# Configure the essential configurations below and do the following:
#
# Repository Creation:
# cap deploy:repository:create
# git add .
# git commit -am "initial commit"
# git push origin master
#
# Initial Deployment:
@gsohoni
gsohoni / unicorn.rb
Created June 3, 2012 12:30 — forked from D3xx73r/unicorn.rb
Unicorn config file
# Define your root directory
root = "/home/deployer/apps/gifroll/current"
# Define worker directory for Unicorn
working_directory root
# Location of PID file
pid "#{root}/tmp/pids/unicorn.pid"
# Define Log paths
@gsohoni
gsohoni / unicorn_ini.sh
Created June 3, 2012 12:30 — forked from D3xx73r/unicorn_ini.sh
Unicorn init shell script
#!/bin/sh
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Manage unicorn server
# Description: Start, stop, restart unicorn server for a specific application.
### END INIT INFO
@gsohoni
gsohoni / deploy.rb
Created June 3, 2012 12:31 — forked from D3xx73r/deploy.rb
Capistrano deploy file
require "bundler/capistrano"
# Define your server here
server "<server>", :web, :app, :db, primary: true
# Set application settings
set :application, "<app_name>"
set :user, "<deployment_user>" # As defined on your server
set :deploy_to, "/home/#{user}/apps/#{application}" # Directory in which the deployment will take place
set :deploy_via, :remote_cache