Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
bivou.ac
  mstannard@gmail.com
What?
–noun
  1.a military encampment made with tents or improvised shelters.
  2.the place used for such an encampment.
-...
How?

Don't reinvent the wheel,
use existing tools:

• nginx
• phusion passenger
• git
• sinatra
nginx/passenger configuration
>sudo gem install passenger
>sudo passenger-install-nginx-module

server {
  listen 80;
  se...
git

• how we get our code on the server
• hooks for restarting the site

Look in .git/hooks/ for samples

We use the post...
The Sinatra App



• one model – Sites
• name:string
• ssh_public_key:string
on Site creation

• create folder in webserver dir
• git init .
• create git post-receive hook
• add key to authorized_key...
post-receive hook

cd #{site.directory} && git --git-dir=`pwd`/.git reset –hard;

# Matches the working tree and index to ...
Thanks to:

Keith Pitty
Mike Koukoulis
Ben Hoskings

http://bivou.ac
http://github.com/martinstannard/bivouac
Upcoming SlideShare
Loading in …5
×

bivou.ac

743 views

Published on

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

Published in: Technology
  • Be the first to comment

  • Be the first to like this

bivou.ac

  1. 1. bivou.ac mstannard@gmail.com
  2. 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. 3. How? Don't reinvent the wheel, use existing tools: • nginx • phusion passenger • git • sinatra
  4. 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. 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. 6. The Sinatra App • one model – Sites • name:string • ssh_public_key:string
  7. 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. 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. 9. Thanks to: Keith Pitty Mike Koukoulis Ben Hoskings http://bivou.ac http://github.com/martinstannard/bivouac

×