Upgrade to Pro — share decks privately, control downloads, hide ads and more …

budapest.rb blog technikai megoldások

budapest.rb blog technikai megoldások

A (Hungarian) presentation at budapest.rb with Bence Golda about the technical details of the meetup blog.

László Bácsi

October 15, 2008
Tweet

More Decks by László Bácsi

Other Decks in Programming

Transcript

  1. deploy folyamat kiszolgáló Apache egy VPN hálón github push →

    deploy szkript hívás → ellenőrzés → pull és generálás vagy 404 deploy szkript egy egyszerű Rack alkalmazás az egész Passengeren fut
  2. %w{rubygems rack json}.each {|lib| require lib} class DeployApp # Handles

    incoming requests, does deploy if everything is in order def handle_request return not_found unless request_is_ok? payload = JSON.parse(@req.POST["payload"]) if do_deploy?(payload) FileUtils.touch(SEMAFOR) deploy FileUtils.rm(SEMAFOR) @res.write "Deployment in progress, check back later" else @res.write "Not deploying" end end # Call is the entry point for all rack apps. def call(env) @req = Rack::Request.new(env) @res = Rack::Response.new handle_request @res.finish end end Rack alkalmazás