Ruby Applications
Containerized Ruby applications can be created and managed in OpenPanel Enterprise Edition.
Create an Applicationβ
To create a new Ruby application, navigate to OpenPanel > AutoInstaller and click Setup Ruby Application.
On the next page, you can configure the following settings:
- Name β The name of the application and container as displayed in OpenPanel.
- Port β Set a custom port if your app uses one. Otherwise, port 80 is used by default.
- Domain Name / Subfolder β The domain (and optional subfolder) where the application will be publicly accessible.
- Startup File β The file executed at startup with the
rubycommand. Defaults toapp.rb. - Custom Startup Command β Use a custom startup command instead of the default
ruby. - Type β Fixed to Ruby.
- Version β Select any available Ruby version from Docker Hub's official
rubyimage tags. - Run Install β Run
bundle installusing theGemfilebefore starting the application. Skip this if your application is already built or has no gem dependencies. - CPU Cores β Number of CPU cores allocated to the application.
- Memory β Amount of memory (in GB) allocated to the application.
After completing the form, click Start Installation. The installation process will be displayed below the form. Once complete, youβll be redirected to the management page where you can view all your applications.
Example Appβ
A minimal Sinatra application.
Example app.rb file:
require 'sinatra'
set :port, 3000
set :bind, '0.0.0.0'
get '/' do
'Hello World from Ruby on port 3000!'
end
Example Gemfile:
source 'https://rubygems.org'
gem 'sinatra'
Enable Run Install so bundle install runs before the app starts.
Manage Applicationsβ
Once your application is created, you can manage it from OpenPanel > Site Manager.
Click Manage next to the application name to open its management page.
On this page, you can view important details such as:
- Screenshot β Preview of the applicationβs domain.
- Status β Current container status.
- Version β Ruby version in use.
- CPU Limit β Configured CPU allocation.
- Memory Limit β Configured memory allocation.
- Speed β Google PageSpeed Insights data for the website.
- Files β Current folder path and size.
- Firewall β WAF (Web Application Firewall) status for the domain (if enabled).
You also have several management options:
- Actions β Start, stop, or restart the container.
- Overview β Modify startup file or command, working directory, package installation settings (Bundler), version, and resource limits (CPU, Memory, PIDs).
- Install Packages β View and manage the
Gemfile, and runbundle install. - Logs β View container logs for troubleshooting.
- Remove β Delete the application.