Quickstart for Padrino application for OpenShift.
These are some special considerations you may need to keep in mind when running your application on OpenShift.
Your application is configured to use your OpenShift database in production mode. This example is configured to use Sequel as the ORM with PostgreSQL database on backend.
The config/database.rb
file is modified to connect to the OpenShift PostgreSQL
database automatically without having any credentials written in this file.
For 'development' mode, you would need to change the database name.
To use different database, like MySQL or MongoDB, you will need to modify the
config/database.rb
file.
This example application comes with the Example
application baked in.
When you visit the OpenShift application for the first time, you will see output
of the example/controllers/hello.rb#index
action.
To remove the Example sub-application, you can run the following command:
cd your_application/
padrino g app example -d
This Padrino application comes with the JQuery assets baked in.
-
Create an account at http://openshift.redhat.com
-
Create a Padrino application:
rhc app create -a padrinoapp ruby-1.9 postgresql-9.2 --from-code https://github.com/mfojtik/padrino-example
This code is dedicated to the public domain to the maximum extent permitted by applicable law, pursuant to CC0 (http://creativecommons.org/publicdomain/zero/1.0/)