Giter Site home page Giter Site logo

jeremykohn / ruby2-rails4-bootstrap-heroku Goto Github PK

View Code? Open in Web Editor NEW

This project forked from diowa/ruby2-rails4-bootstrap-heroku

0.0 1.0 0.0 608 KB

A starter application based on Ruby 2, Rails 4 and Bootstrap for Sass, deployable on Heroku, developable on Nitrous.IO

Home Page: http://ruby2-rails4-bootstrap-heroku.herokuapp.com/

License: Other

Ruby 75.42% HTML 19.47% CoffeeScript 0.95% CSS 4.17%

ruby2-rails4-bootstrap-heroku's Introduction

Rails Starter App

Build Status Dependency Status Code Climate Coverage Status

Deploy

This is a starter web application based on the following technology stack:

Starter App is deployable on Heroku. Demo: http://ruby2-rails4-bootstrap-heroku.herokuapp.com/

Gemfile also contains a set of useful gems for performance, security, api building...

Thread safety

We assume that this application is thread safe. If your application is not thread safe or you don't know, please set the minimum and maximum number of threads usable by puma on heroku to 1:

$ heroku config:set MIN_THREADS=1 MAX_THREADS=1

Heroku Platform API

This application supports fast setup and deploy via app.json:

$ curl -n -X POST https://api.heroku.com/app-setups \
-H "Content-Type:application/json" \
-H "Accept:application/vnd.heroku+json; version=3" \
-d '{"source_blob": { "url":"https://github.com/diowa/ruby2-rails4-bootstrap-heroku/tarball/master/"} }'

More information: Setting Up Apps using the Platform API

Recommended add-ons

Heroku's Production Check recommends the use of the following add-ons, here in the free version:

$ heroku addons:add newrelic:stark # App monitoring
$ heroku config:set NEW_RELIC_APP_NAME="Rails Starter App" # Set newrelic app name
$ heroku addons:add papertrail # Log monitoring
$ heroku addons:add pgbackups:auto-month # Postgres backups

Secrets.yml

Rails 4.1.0 introduced secrets.yml. Heroku automatically sets a proper configuration variable in new applications. Just in case you need, the command line is:

$ heroku config:add SECRET_KEY_BASE="$(bundle exec rake secret)"

NOTE: If you need to migrate old cookies, please read the above guide.

Tuning Ruby's RGenGC

Generational GC (called RGenGC) was introduced from Ruby 2.1.0. RGenGC reduces marking time dramatically (about x10 faster). However, RGenGC introduce huge memory consumption. This problem has impact especially for small memory machines.

Ruby 2.1.1 introduced new environment variable RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR to control full GC timing. By setting this variable to a value lower than the default of 2 (we are using the suggested value of 1.3) you can indirectly force the garbage collector to perform more major GCs, which reduces heap growth.

$ heroku config:set RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.3

More information: Change the full GC timing

Nitrous.IO

Starter App supports online development on Nitrous.IO.

You need:

  • A Nitrous.IO box with at least 512MB of memory.
  • Two "Dev Plan" heroku databases (one for development and one for test)
  • The following environment variables on your Nitrous.IO box's .bashrc:
    export STARTER_APP_DEV_DB_DATABASE=YOUR_DEV_DB_DATABASE
    export STARTER_APP_DEV_DB_USER=YOUR_DEV_DB_USER
    export STARTER_APP_DEV_DB_PASSWORD=YOUR_DEV_DB_PASSWORD
    export STARTER_APP_DEV_DB_HOST=YOUR_DEV_DB_HOST
    export STARTER_APP_DEV_DB_PORT=YOUR_DEV_DB_PORT
    
    export STARTER_APP_TEST_DB_DATABASE=YOUR_TEST_DB_DATABASE
    export STARTER_APP_TEST_DB_USER=YOUR_TEST_DB_USER
    export STARTER_APP_TEST_DB_PASSWORD=YOUR_TEST_DB_PASSWORD
    export STARTER_APP_TEST_DB_HOST=YOUR_TEST_DB_HOST
    export STARTER_APP_TEST_DB_PORT=YOUR_TEST_DB_PORT

A guide for creating heroku databases and edit .bashrc on Nitrous.IO is available here: http://help.nitrous.io/postgres/

ruby2-rails4-bootstrap-heroku's People

Contributors

tagliala avatar cesidio avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.