此内容没有您所选择的语言版本。

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

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat