feat(provision): refactor to add other setup examples
[arvados.git] / tools / salt-install / config_examples / single_host / multiple_hostnames / pillars / nginx_workbench2_configuration.sls
1 ---
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: AGPL-3.0
5
6 ### ARVADOS
7 arvados:
8   config:
9     group: www-data
10
11 ### NGINX
12 nginx:
13   ### SITES
14   servers:
15     managed:
16       ### DEFAULT
17       arvados_workbench2_default:
18         enabled: true
19         overwrite: true
20         config:
21           - server:
22             - server_name: workbench2.__CLUSTER__.__DOMAIN__
23             - listen:
24               - 80
25             - location /.well-known:
26               - root: /var/www
27             - location /:
28               - return: '301 https://$host$request_uri'
29
30       arvados_workbench2_ssl:
31         enabled: true
32         overwrite: true
33         config:
34           - server:
35             - server_name: workbench2.__CLUSTER__.__DOMAIN__
36             - listen:
37               - __HOST_SSL_PORT__ http2 ssl
38             - index: index.html index.htm
39             - location /:
40               - root: /var/www/arvados-workbench2/workbench2
41               - try_files: '$uri $uri/ /index.html'
42               - 'if (-f $document_root/maintenance.html)':
43                 - return: 503
44             - location /config.json:
45               - return: {{ "200 '" ~ '{"API_HOST":"__CLUSTER__.__DOMAIN__:__HOST_SSL_PORT__"}' ~ "'" }}
46             - include: 'snippets/arvados-snakeoil.conf'
47             - access_log: /var/log/nginx/workbench2.__CLUSTER__.__DOMAIN__.access.log combined
48             - error_log: /var/log/nginx/workbench2.__CLUSTER__.__DOMAIN__.error.log