Skip to content

Latest commit

 

History

History
143 lines (86 loc) · 3.81 KB

CUSTOMIZATION.md

File metadata and controls

143 lines (86 loc) · 3.81 KB

Customizations of the default rails application

These are the things that are different in the app template generated by railman compared to the plain app template generated by rails.

.ruby-version

Specify your ruby version here.

.envrc

If you install direnv, you don't have to use bundle exec any more, as the bin direcory is added to the PATH when you are enter the application's directory.

Gemfile

Add following gems: pg - postgres database driver jquery-turbolinks - ? bootstrap-sass - ? bootstrap_form - ? bootstrap-datepicker-rails - ? active_link_to - ? dalli & kgio - memcached client unicorn & unicorn_rails - use unicorn in development and production capistrano & capistrano-* - deployment with capistrano exception_notification - notify me per email on each exception better_errors & binding_of_caller - better error page with repl in development quiet_assets - less noise in development log letter_opener - open emails in popup window in the browser in development mode minitest-reporters - generate xml for jenkins simplecov & simplecov-rcov - generate coverage reports locally and for jenkins capybara & capybara_minitest_spec - for webtests selenium-webdriver - use real browser for webtests poltergeist - headless tests with phantom.js

Remove following gems: sqlite3 - we are using postgres per default jbuilder - not every application needs it byebug - we don't use it, we use the RubyMine debugger instead

Add the application-specific gems to Gemfile.local, so it can be kept separate from the base Gemfile.

Eyefile

Eye is a ruby process manager. We use it to start/stop/restart/monitor the application ruby processes.

The configuration of the processes that the application includes (app server, workers) is in the Eyefile.

The eye gem is not included in the Gemfile. Eye should be installed globally on the server or your local machine and there will be only one eye process that manages multiple rails applications.

.env.example.development and .env.example.production

These are templates for the application- and server-specific .env file (for development and production).

config/deploy/production.rb

config/deploy includes the deployment targets (production, staging, ...)

This is the configuration capistrano uses when you invoke cap TARGET deploy

TODO: ask for server name on railman new APP_NAME

config/environments/development.rb

Add config.action_mailer.default_url_options and letter_opener (todo)

config/environments/production.rb

Add smtp settings and exception notification settings

config/environments/test.rb

Add config.action_mailer.default_url_options

config/locales/readme.txt

Describes how to add additional languages

config/server/nginx.conf

Nginx configuration. Capistrano links this file in the nginx conf.

config/server/logrotate.conf

Logrotate configuration. Capistrano links this file ...

config/server/letsencrypt.conf

Let's Encrypt configuration file that can be used to automatically generate Let's Encrypt SSL certificates.

config/database.yml

Use postgres. Use database user and password from .env

config/secrets.yml

Use SECRET_TOKEN from .env

config/deploy.rb

Custom capistrano deployment script

Capfile

Capistrano main file (generated by capify!)

app/assets/stylesheets

Delete application.css Add application.sass

app/assets/javascripts/application.js

Add: //= require jquery.turbolinks //= require bootstrap-sprockets //= require bootstrap-datepicker

views/layouts

Modify application.html.erb Add _messages.html.erb

app/controllers/home_controller.rb

Home controller shows the main page

app/views/home/index.html.erb

Dummy welcome page

config/routes.rb

Remove comments and set root

README

Remove README.rdoc Add README.md

.gitignore

Ignore: .env, .idea, .DS_Store