Created
April 3, 2009 19:10
-
-
Save deruelle/89908 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>During development, and in some production scenarios, it's useful to maintain your Rails application source in a location outside of <strong>$JBOSS_HOME</strong>. Additionally, the <strong>$RAILS_ENV</strong> variable may need to be set differently on different servers (production, staging, testing) perhaps.</p> | |
<p>To enable deployment-from-a-distance, the JBoss-Rails recognizes a top-level <strong>*-rails.yml</strong> deployment descriptor if placed within your server's <strong>deploy/</strong> directory.</p> | |
<p>This is a YAML file with 1 required section and additional optional sections. Values specified in this descriptor override any that may be provided within the application's own <strong>config/</strong> directory.</p> | |
<h2>Application Configuration [Required]<br /></h2> | |
<pre>application:<br /> RAILS_ROOT: /path/to/your/rails-application<br /> RAILS_ENV: production<br /></pre> | |
<p>The application section must define <strong>RAILS_ROOT</strong> and <strong>RAILS_ENV</strong>. <strong>RAILS_ROOT</strong> must be an absolute path to your application's code directory. If you leverage the hot-deployment capability, we recommend that each deployment of your app should exist as a distinctly named directory. And avoid using <strong>current/</strong> types of symlinks.</p> | |
<p><strong>RAILS_ENV</strong>, if specified, will override any value present within the application's own <a title="jboss-rails-env.yml" href="/theses/jboss-rails/projects/jboss-rails/pages/jboss-rails-env-yml">jboss-rails-env.yml</a> descriptor.</p> | |
<h2>Web Configuration [Optional]</h2> | |
<p>The web configuration section allows you to define the context path (URL path prefix) and host to use for the deployment. </p> | |
<p>If unspecified, the <strong>context</strong> defaults to the root (<em>http://<HOST>:8080/</em>). If no host is specified, or the token <strong>*</strong> is used, the application will respond to all requests.</p> | |
<pre>web:<br /> context: /<br /> host: myapp.oddthesis.org<br /></pre> | |
<p>Or using purely context-based serving</p> | |
<pre>web:<br /> context: /myapp<br /> host: *<br /></pre> | |
<h2>Sip Configuration [Optional]</h2> | |
<p>The sip configuration section allows you to define the <strong>appname</strong> of the sip servlets application (<em>mandatory</em>) and the name of the code that will handle the SIP messages :</p> | |
<h3>Pure Ruby application<br /></h3> | |
<p>if the code handling SIP messages is pure ruby then use <em>rubycontroller</em> : <name of the SIP handler class></p> | |
<p>Example</p> | |
<pre>sip:<br /> appName: TwigglApplication<br /> rubycontroller: SipHandler<br /></pre> | |
<p> </p> | |
<h3>Multi language application<br /></h3> | |
<p>if your application is a multilanguage application and the code handling SIP Messages is Java Sip Servlets, use <em><strong>mainservlet</strong></em> to identify the servlet handling incoming initial requests in the java code. <em>Optional</em> if your application contains more than one servlet and if the sip code is in java.</p> | |
<p><br />Example</p> | |
<pre>sip:<br /> appName: TwigglApplication<br /> mainservlet: org.mobicents.servlet.sip.demo.jruby.JRubySipServlet<br /></pre> | |
<p> </p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment