bivou.ac
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

bivou.ac

on

  • 951 views

A brief overview of bivou.ac, the sinatra app for deploying web apps

A brief overview of bivou.ac, the sinatra app for deploying web apps

Statistics

Views

Total Views
951
Views on SlideShare
951
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

bivou.ac Presentation Transcript

  • 1. bivou.ac mstannard@gmail.com
  • 2. What? –noun 1.a military encampment made with tents or improvised shelters. 2.the place used for such an encampment. -verb 3.to rest or assemble in such an area; encamp. A sinatra app for deploying rack-compliant web apps push == deploy
  • 3. How? Don't reinvent the wheel, use existing tools: • nginx • phusion passenger • git • sinatra
  • 4. nginx/passenger configuration >sudo gem install passenger >sudo passenger-install-nginx-module server { listen 80; server_name bivouac.com www.bivouac.com; root /home/bivouac/current/public; passenger_enabled on; } server { listen 80; server_name *.bivouac.com; root /home/bivouac/apps/$host/public; passenger_enabled on; }
  • 5. git • how we get our code on the server • hooks for restarting the site Look in .git/hooks/ for samples We use the post-receive hook
  • 6. The Sinatra App • one model – Sites • name:string • ssh_public_key:string
  • 7. on Site creation • create folder in webserver dir • git init . • create git post-receive hook • add key to authorized_keys • show git commands
  • 8. post-receive hook cd #{site.directory} && git --git-dir=`pwd`/.git reset –hard; # Matches the working tree and index to that of the tree being switched to (defaults to HEAD). touch #{site.directory}/tmp/restart.txt # tells passenger to restart the site
  • 9. Thanks to: Keith Pitty Mike Koukoulis Ben Hoskings http://bivou.ac http://github.com/martinstannard/bivouac