Documentation menu

Deploy any Ruby app on Light Cloud - the runtime behind Rails and Sinatra, running Rack apps as containers on port 3000.

Deploy Ruby

Any Rack-compatible Ruby app runs as a container on the Ruby runtime - the machinery behind the Rails and Sinatra guides, available to Hanami, Roda, Grape, and plain Rack apps too. Detection reads your Gemfile; the default port is 3000.

The contract#

  • Serve with a production server (Puma is the default answer), bound to 0.0.0.0 on the routed port - PORT is set to it.
  • Log to stdout/stderr for runtime logs.
bundle exec puma -b tcp://0.0.0.0:$PORT

Configuration and database#

Containers receive environment variables at runtime - read ENV at boot. DATABASE_URL from the Credentials tab is understood by ActiveRecord and Sequel natively.

Scaling#

Sync Ruby servers hold a request per thread - set concurrency near your total thread count instead of the default 80, and let idle apps scale to zero.