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 "bin/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 = "bin/rails console" %}
32 <pre><code>{{railshost}}~$ <span class="userinput">cd {{railsdir}}</span>
33 {{railshost}}{{railsdir}}$ <span class="userinput">sudo -u <b>webserver-user</b> RAILS_ENV=production {{railscmd}}</span>
34 {% if railsout %}{{railsout}}
35 {% endif %}</code></pre>