mkdir -p ~/.vim/autoload ~/.vim/bundle; \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vimAgregar estas líneas al archivo ~/.vimrc
execute pathogen#infect()
set nocompatiblemkdir -p ~/.vim/autoload ~/.vim/bundle; \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vimAgregar estas líneas al archivo ~/.vimrc
execute pathogen#infect()
set nocompatible| Instalación del entorno de Ruby en Ubuntu 13.10 | |
| Instalación de Ruby de acuerdo a http://rvm.io: | |
| ``` | |
| \curl -sSL https://get.rvm.io | bash -s stable | |
| ``` | |
| En las preferencias de la consola de gnome, agregar que cuando se active la consola sea como login (conexión) y se abre una nueva terminal. |
| check process unicorn-<<aplicacion>> | |
| with pidfile /home/deployer/apps/<<aplicacion>>/current/tmp/pids/unicorn.pid | |
| start program = "/etc/init.d/unicorn_blog start" | |
| stop program = "/etc/init.d/unicorn_blog stop" | |
| restart program = "/etc/init.d/unicorn_blog stop && /etc/init.d/unicorn_blog start" | |
| group unicorn-blog | |
| check file blog-restart with path /home/deployer/apps/<<aplicacion>>/current/tmp/restart.txt | |
| if changed timestamp | |
| then exec "/usr/bin/monit -g unicorn-blog restart" |
| set :application, 'prueba' | |
| set :scm, "git" | |
| set :repo_url, "git@github.com:LogicalBricks/prueba.git" | |
| set :deploy_to, "/home/deployer/apps/#{fetch(:application)}" | |
| set :ssh_options, { | |
| forward_agent: true | |
| } | |
| set :log_level, :debug |
| set :stage, :production | |
| role :app, %w{deployer@162.243.71.34} | |
| role :web, %w{deployer@162.243.71.34} | |
| role :db, %w{deployer@162.243.71.34} | |
| server '162.243.71.34', user: 'deployer', roles: %w{web app db} | |
| set :branch, ENV["REVISION"] || ENV["BRANCH_NAME"] || "master" |
| set :stage, :staging | |
| set :rails_env, 'production' | |
| set :deploy_to, "/home/deployerdemo/apps/#{fetch(:application)}" | |
| role :app, %w{deployerdemo@162.243.105.100} | |
| role :web, %w{deployerdemo@162.243.105.100} | |
| role :db, %w{deployerdemo@162.243.105.100} | |
| server '162.243.105.100', user: 'deployerdemo', roles: %w{web app db} |
| upstream unicorn { | |
| server unix:/tmp/unicorn.<<aplicacion>>.sock fail_timeout=0; | |
| } | |
| server { | |
| listen 80 default deferred; | |
| # server_name example.com; | |
| root /home/deployer/apps/<<aplicacion>>/current/public; | |
| location ^~ /assets/ { |
| root = "/home/deployer/apps/<<aplicacion>>/current" | |
| working_directory root | |
| pid "#{root}/tmp/pids/unicorn.pid" | |
| stderr_path "#{root}/log/unicorn.log" | |
| stdout_path "#{root}/log/unicorn.log" | |
| listen "/tmp/unicorn.<<aplicacion>>.sock" | |
| worker_processes 2 | |
| timeout 30 |
| #!/bin/sh | |
| set -e | |
| # Feel free to change any of the following variables for your app: | |
| TIMEOUT=${TIMEOUT-60} | |
| APP_ROOT=/home/deployer/apps/<<aplicacion>>/current | |
| PID=$APP_ROOT/tmp/pids/unicorn.pid | |
| CMD="cd $APP_ROOT; bundle exec unicorn -D -c $APP_ROOT/config/unicorn.rb -E production" | |
| AS_USER=deployer | |
| set -u |
| $ cd ~/.rbenv/plugins/ruby-build/ | |
| $ git pull | |
| $ cd .rbenv | |
| $ git pull | |
| $ rbenv install <ruby-version> |