/bender

Primary LanguageRubyMIT LicenseMIT

Bender

CI Code Climate Ruby Style Guide

A kegerator monitoring application built to run on a RaspberryPi or BeagleBone Black.

Currently runs at Collective Idea on a Raspberry Pi 4. Previously it ran on a Pi 3 (see ruby2 tag). It is both simplistic and overkill at the same time. Why not?

Home page

Keg details page

Running

Requirements

  • Ruby 3.3.1
  • PostgreSQL
  • Foreman (gem install foreman) or another Procfile runner (Overmind)

Setup

  1. Clone the repo
  2. bundle
  3. bin/setup
  4. foreman start -f Procfile.dev

Production

See doc/pi_setup.md for current instructions.

Basic concepts

The Rails app is pretty typical. There's a Faye process (running via Rack) to facilitate some realtime data updates.

Many settings are controlled by environment variables. See the .env.example and copy to .env as needed.

Pours and taps are controlled via the Pi's GPIO. Two rake tasks manage them. The pour monitoring runs a separate mruby process.