2 This template recognizes four variables:
3 * railshost: The hostname included in the prompt, to let the user know where to run the command. If this is the empty string, no hostname will be displayed. Default "apiserver".
4 * railsdir: The directory included in the prompt, to let the user know where to run the command. Default "/var/www/arvados-api/current".
5 * railscmd: The full command to run. Default "bundle exec rails console".
6 * railsout: The expected output of the command, if any.
7 {% endcomment %} Change *@webserver-user@* to the user that runs your web server process. If you install Phusion Passenger as we recommend, this is *@www-data@* on Debian-based systems, and *@nginx@* on Red Hat-based systems.
10 {% assign railshost = "apiserver" %}
13 {% unless (railshost == "") or (railshost contains ":") %}
14 {% capture railshost %}{{railshost}}:{% endcapture %}
18 {% assign railsdir = "/var/www/arvados-api/current" %}
22 {% assign railscmd = "bundle exec rails console" %}
28 <pre><code>{{railshost}}~$ <span class="userinput">cd {{railsdir}}</span>
29 {{railshost}}{{railsdir}}$ <span class="userinput">sudo -u <b>webserver-user</b> RAILS_ENV=production `which rvm-exec` default {{railscmd}}</span>
30 {% if railsout %}{{railsout}}
31 {% endif %}</code></pre>
37 <pre><code>{{railshost}}~$ <span class="userinput">cd {{railsdir}}</span>
38 {{railshost}}{{railsdir}}$ <span class="userinput">sudo -u <b>webserver-user</b> RAILS_ENV=production {{railscmd}}</span>
39 {% if railsout %}{{railsout}}
40 {% endif %}</code></pre>