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

Herokuの紹介

 Herokuの紹介

JAWS-UG 秋田支部 第一回勉強会で発表したスライドです。

Katsuyoshi Ito

June 13, 2013
Tweet

More Decks by Katsuyoshi Ito

Other Decks in Programming

Transcript

  1. Herokuͱ͸ʁ • ૑ۀ 2007೥ Ruby On Rails ։ൃ؀ڥ(IDE) • ϓϥοτϑΥʔϜɾαʔϏε(PaaS)

    • Web ApplicationͷϓϥοτϑΥʔϜ • 2010 salesforce.comʹΑΔങऩ • Ceder(γμʔ) ελοΫ • PythonɺJVM ݴޠɺNode.jsɺetc 13೥6݄14೔༵ۚ೔
  2. heroku΁ͷDeploy • ϩʔΧϧ • ΞϓϦ࡞੒ • gitͰ؅ཧ • ಈ࡞֬ೝOK •

    HerokuʹΞϓϦ࡞੒ • gitͰpush • herokuίϚϯυͰϝϯςφϯε 13೥6݄14೔༵ۚ೔
  3. ΞϓϦ࡞੒ (Ruby On Rails) $ rails new diary create create

    README.rdoc create Rakefile . . . create vendor/plugins/.gitkeep run bundle install 13೥6݄14೔༵ۚ೔
  4. gitͰ؅ཧ $ cd diary $ git init Initialized empty Git

    repository in /Users/ISD/ Documents/community/aws-akita/diary/.git/ $ git add . $ git commit -m "initial import" -a [master (root-commit) 3adc05c] initial import 37 files changed, 1204 insertions(+) create mode 100644 .gitignore . . 13೥6݄14೔༵ۚ೔
  5. ϩʔΧϧͰಈ࡞֬ೝ $ rails g scaffold article title:string body:text $ rake

    db:migrate $ vi config/routes.rb root :to => 'articles#index' $ rm public/index.html $ rails s 13೥6݄14೔༵ۚ೔
  6. Postgres $ vi Gemfile group :production do gem 'pg' end

    group :development, :test do gem 'sqlite3' end $ bundle 13೥6݄14೔༵ۚ೔
  7. git commit $ git add . $ git commit -m

    "ϩʔΧϧͰಈ࡞֬ೝ͠· ͨ͠" -a 13೥6݄14೔༵ۚ೔
  8. HerokuΞϓϦ࡞੒ $ heroku apps:create Creating serene-peak-3944... done, stack is cedar

    http://serene-peak-3944.herokuapp.com/ | [email protected]:serene-peak-3944.git Git remote heroku added 13೥6݄14೔༵ۚ೔
  9. Deploy $ git push heroku master . -----> Ruby/Rails app

    detected . -----> Compiled slug size: 9.4MB -----> Launching... done, v6 http://serene-peak-3944.herokuapp.com deployed to Heroku To [email protected]:serene-peak-3944.git * [new branch] master -> master 13೥6݄14೔༵ۚ೔
  10. Add-ons • Data Store • Mobile • Search • Logging

    • Email and SMS • Analytics • Payments • etc ... https://addons.heroku.com 13೥6݄14೔༵ۚ೔