LoginSignup
1
1

More than 5 years have passed since last update.

jekyllをさくらVPSからHerokuへ移行。

Last updated at Posted at 2015-07-26

設定

Gemfile

rack-jekyll、unicorn追記

Gemfile
gem 'jekyll'
gem 'nokogiri'
gem 'therubyracer'

# heroku用に追記
gem 'rack-jekyll'
gem 'unicorn'

config.ru

/直下に新規作成

config.ru
require "bundler/setup"
Bundler.require(:default)
run Rack::Jekyll.new(:destination => '_site')

_config.yml

exclude追記

_config.yml
// jekyll本体に関係ないファイル・ディレクトリ指定
exclude: ['config.ru', 'Gemfile', 'Gemfile.lock', 'vendor']

unicorn.rb

/直下に新規作成

unicorn.rb
worker_processes 1
timeout 30
preload_app true

確認

Herokuアプリ作成してプッシュ。

$ heroku create アプリ名
$ git push heroku master
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1