19015: installer fix: work around a Passenger issue with the detection of RVM
[arvados.git] / tools / salt-install / config_examples / single_host / single_hostname / pillars / nginx_workbench_configuration.sls
1 ---
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: AGPL-3.0
5
6 {%- if grains.os_family in ('RedHat',) %}
7   {%- set group = 'nginx' %}
8 {%- else %}
9   {%- set group = 'www-data' %}
10 {%- endif %}
11
12 ### ARVADOS
13 arvados:
14   config:
15     group: {{ group }}
16
17 ### NGINX
18 nginx:
19   ### SERVER
20   server:
21     config:
22
23       ### STREAMS
24       http:
25         upstream workbench_upstream:
26           - server: '__IP_INT__:9000 fail_timeout=10s'
27
28   ### SITES
29   servers:
30     managed:
31       ### DEFAULT
32       arvados_workbench_default.conf:
33         enabled: true
34         overwrite: true
35         config:
36           - server:
37             - server_name: workbench.__CLUSTER__.__DOMAIN__
38             - listen:
39               - 80
40             - location /.well-known:
41               - root: /var/www
42             - location /:
43               - return: '301 https://$host$request_uri'
44
45       arvados_workbench_ssl.conf:
46         enabled: true
47         overwrite: true
48         requires:
49           __CERT_REQUIRES__
50         config:
51           - server:
52             - server_name: __HOSTNAME_EXT__
53             - listen:
54               - __WORKBENCH1_EXT_SSL_PORT__ http2 ssl
55             - index: index.html index.htm
56             - location /:
57               - proxy_pass: 'http://workbench_upstream'
58               - proxy_read_timeout: 300
59               - proxy_connect_timeout: 90
60               - proxy_redirect: 'off'
61               - proxy_set_header: X-Forwarded-Proto https
62               - proxy_set_header: 'Host $http_host'
63               - proxy_set_header: 'X-Real-IP $remote_addr'
64               - proxy_set_header: 'X-Forwarded-For $proxy_add_x_forwarded_for'
65             - include: snippets/ssl_hardening_default.conf
66             - ssl_certificate: __CERT_PEM__
67             - ssl_certificate_key: __CERT_KEY__
68             - access_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__.access.log combined
69             - error_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__.error.log
70
71       arvados_workbench_upstream:
72         enabled: true
73         overwrite: true
74         config:
75           - server:
76             - listen: '__IP_INT__:9000'
77             - server_name: workbench
78             - root: /var/www/arvados-workbench/current/public
79             - index:  index.html index.htm
80             - passenger_enabled: 'on'
81             # yamllint disable-line rule:line-length
82             - access_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__-upstream.access.log combined
83             - error_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__-upstream.error.log