Chapter 5. Creating Template Directories for Language Cartridges


Use the $cartridge_name/template/ or $cartridge_name/template.git/ directory to provide a basic example of an application written in the language or framework your cartridge packages. Welcome the application developer to your cartridge and inform them that the cartridge is operating correctly.
If you provide a $cartridge_name/template.git/ directory, OpenShift Enterprise copies the directory for the application developer.
If you provide a $cartridge_name/template/ directory, OpenShift Enterprise uses it to create a Git repository for the application developer. Ensure that your setup and install scripts account for the path change from template to template.git.
Create .gitignore files in empty directories to ensure the directories are retained when OpenShift Enterprise builds the Git repository.

Example 5.1. Ruby Template Directory

A Ruby 1.8 cartridge with Passenger support has a template/public/ directory and a config.ru file to define the web application.
+- template
|  +- config.ru
|  +- public
|  |  +- .gitignore
|  .openshift
|  +- markers
|  |- ...
Copy to Clipboard Toggle word wrap

5.1. Marker Files

The $cartridge_name/template/.openshift/markers/ directory contains example marker files for application developers. These files set conditions for various stages of a cartridge's life cycle. You can add marker files as required to enable application developers to control aspects of your cartridge.

Example 5.2. Ruby 1.8 Marker Files

Expand
Marker Action
force_clean_build OpenShift Enterprise removes previous output from the bundle install --deployment command and reinstalls all gems according to the current Gemfile and Gemfile.lock files.
hot_deploy OpenShift Enterprise serves new application code without restarting the application's web server.
disable_auto_scaling OpenShift Enterprise does not automatically scale a scalable application.
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top