Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
# If you meet install errors, see abid-hussain's comment | |
sudo apt-get --force-yes install build-essential openssl libreadline6 libreadline6-dev curl git-core \ | |
zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev \ | |
libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison | |
&& | |
\curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled |
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
# | |
# Working with branches | |
# | |
# Get the current branch name (not so useful in itself, but used in | |
# other aliases) | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
# Push the current branch to the remote "origin", and set it to track | |
# the upstream branch | |
publish = "!git push -u origin $(git branch-name)" |
require 'bundler/capistrano' | |
require 'capistrano-unicorn' | |
set :stages, %w(production staging) | |
set :default_stage, "staging" | |
require 'capistrano/ext/multistage' | |
# set :env, fetch(:env, "production") | |
set :application, "tp" |
# http://stackoverflow.com/a/18684021 | |
# Bootstrap 3 | |
inputs = %w[ | |
CollectionSelectInput | |
DateTimeInput | |
FileInput | |
GroupedCollectionSelectInput | |
NumericInput | |
PasswordInput | |
RangeInput |
# SSL self signed localhost for rails start to finish, no red warnings. | |
# 1) Create your private key (any password will do, we remove it below) | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
COLOR_CODES = { | |
'green': '\033[32m', | |
'bgreen': '\033[1;32m', | |
'bgrey': '\033[1;30m', | |
'reset': '\033[0m' | |
} | |
def color(text, color_name): | |
return COLOR_CODES[color_name]+text+COLOR_CODES['reset'] |
... | |
set :default_environment, { | |
'LD_LIBRARY_PATH' => "#{shared_dir}/oracle/" | |
} |
#!/bin/bash | |
target_branch="production" | |
working_tree="PATH_TO_DEPLOY" | |
while read oldrev newrev refname | |
do | |
branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then | |
#!/bin/sh | |
echo "Installing php5 build dependencies..." | |
apt-get build-dep -q=2 php5 | |
cd /tmp | |
# Get PHP | |
echo "Downloading and extracting php5.5.9 source..." | |
wget -q -O php5.5.9.tar.xz http://us2.php.net/get/php-5.5.9.tar.xz/from/this/mirror | |
tar xf php5.5.9.tar.xz | |
cd php-5.5.9/ | |