Skip to content
This repository was archived by the owner on Oct 30, 2019. It is now read-only.

Install

Taro Matsuzawa aka. btm edited this page Jul 16, 2017 · 10 revisions

Install mongodb

brew update
brew install mongodb
# rmagick issue
brew unlink imagemagick # unlink 7.x
brew install imagemagick@6 # install 6.x
brew link --force imagemagick@6

Install bundler

gem install bundler

Clone sources

git clone [email protected]:html5j/5jcup-site.git
cd 5jcup-site
gem install archive-tar-minitar
bundle install --path=vendor/bundle
cd vendor/bundle/ruby/2.0.0/gems/debugger-ruby_core_source-1.3.8
rake add_source VERSION=2.0.0-p648
cd -
bundle install --path=vendor/bundle

Start mongodb

bundle exec mongod --dbpath=db/mongo

Start locomotive

bundle exec rails server

Access locomotivecms

open http://localhost:3000/locomotive -> Create admin user through the browser

Create wagon environment

gem install locomotivecms_wagon
rbenv rehash # if you use rbenv
wagon init html5j-content
cd html5j-content

edit config/deploy.yml

development:
  host: localhost:8080
  api_key: {YOUR_API_KEY_OBTAINED_FROM_LOCAL_SERVER}
staging:
  host: html5jcup.herokuapp.com
  api_key: {YOUR_API_KEY_OBTAINED_FROM_STAGING_SERVER}
production:
  host: 5jcup.org
  api_key: {YOUR_API_KEY_OBTAINED_FROM_PRODUCTION_SERVER}
  ssl: true

Initialize all data for development

bundle exec wagon pull staging
bundle exec wagon push development

Pull data from production

below commands will pull data of page templates and data entries (excludes files)

bundle exec wagon pull production -r pages content_entries theme_assets

Push data to server

below commands will push data of page templates and data entries (excludes files)

bundle exec wagon push development -r pages content_entries theme_assets # for development
bundle exec wagon push staging -r pages content_entries theme_assets # for staging
bundle exec wagon push production -r pages content_entries theme_assets # for production

Test

bundle exec guard start

Push engine to staging server

git remote add staging [email protected]:html5jcup.git
git push staging master
heroku restart --app html5jcup

Push engine to production server

git remote add production [email protected]:fivejcup-prod.git
git push production master
heroku restart --app fivejcup-prod