GithubHelp home page GithubHelp logo

cloudinary / cloudinary-openshift-ruby-quickstart Goto Github PK

View Code? Open in Web Editor NEW
0.0 14.0 0.0 25 KB

This git repository helps you easily integrate Cloudinary's image management service into your Ruby OpenShift apps.

Shell 16.21% Ruby 66.60% JavaScript 3.77% CSS 13.42%

cloudinary-openshift-ruby-quickstart's Introduction

Cloudinary on OpenShift in 5 Minutes

This git repository helps you easily integrate Cloudinary's image management service into your Ruby OpenShift apps.

###Create your application###

  1. Create an OpenShift account at http://openshift.redhat.com/ and set up you local machine with the client tools.
  2. Sign up for a free Cloudinary account at https://cloudinary.com/users/register/free
  3. Retrieve your account's CLOUDINARY_URL from Cloudinary's dashboard.
  4. Clone and deploy on OpenShift, supplying your CLOUDINARY_URL as application configuration details.
    rhc app create cloudinary ruby-1.9 \
      --from-code https://github.com/cloudinary/cloudinary-openshift-ruby-quickstart.git \
      --env CLOUDINARY_URL=YOUR_CLOUDINARY_URL

The above example uses "cloudinary" as the application name. It also includes an application source URL, and several application configuration details. If the --from-code option is not recognized, update your rhc gem.

If you failed to include your own CLOUDINARY_URL when creating your application, don't worry - There are notes on how to reconfigure your application in the next section.

When the command completes you should have your own clone of the application source code in a folder named after your app (cloudinary), and a live copy of your Photo Album sample application running at:

    http://cloudinary-$yournamespace.rhcloud.com

Using Environment Variables

Use rhc to set the following environment variables for your OpenShift app (substituting in your own value):

rhc env set CLOUDINARY_URL=YOUR_CLOUDINARY_URL -a cloudinary

Then, run the following to restart your application (reloading it's Cloudinary configuration):

rhc app restart cloudinary

You can review your application's full list configuration keys by typing:

rhc env list cloudinary

Local Development

You can run the same code in a local development environment by populating the required environment variables in your local development stage:

export CLOUDINARY_URL=YOUR_CLOUDINARY_URL

Then start your local server with:

rails s

You may need to run bundle install before starting your local server to in order to make sure that your application has access to all of it's dependencies. Next, you can edit your local source to start experimenting with Cloudinary.

When you're ready to deploy an update to OpenShift, git add, git commit, and git push can allow you to update your remote OpenShift example application using a standard code development workflow.

More Information

Additional resources are available at:

cloudinary-openshift-ruby-quickstart's People

Contributors

nadavs avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.