2 Copyright (C) The Arvados Authors. All rights reserved.
4 SPDX-License-Identifier: CC-BY-SA-3.0
8 This template recognizes four variables:
9 * 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".
10 * railsdir: The directory included in the prompt, to let the user know where to run the command. Default "/var/www/arvados-api/current".
11 * railscmd: The full command to run. Default "bundle exec rails console".
12 * railsout: The expected output of the command, if any.
13 {% 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.
15 {% unless railshost %}
16 {% assign railshost = "apiserver" %}
19 {% unless (railshost == "") or (railshost contains ":") %}
20 {% capture railshost %}{{railshost}}:{% endcapture %}
24 {% assign railsdir = "/var/www/arvados-api/current" %}
28 {% assign railscmd = "bundle exec rails console" %}
34 <pre><code>{{railshost}}~$ <span class="userinput">cd {{railsdir}}</span>
35 {{railshost}}{{railsdir}}$ <span class="userinput">sudo -u <b>webserver-user</b> RAILS_ENV=production `which rvm-exec` default {{railscmd}}</span>
36 {% if railsout %}{{railsout}}
37 {% endif %}</code></pre>
43 <pre><code>{{railshost}}~$ <span class="userinput">cd {{railsdir}}</span>
44 {{railshost}}{{railsdir}}$ <span class="userinput">sudo -u <b>webserver-user</b> RAILS_ENV=production {{railscmd}}</span>
45 {% if railsout %}{{railsout}}
46 {% endif %}</code></pre>