17750: Update nginx/ssl example pillars and states
[arvados-formula.git] / test / salt / pillar / examples / nginx_workbench2_configuration.sls
1 ---
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: Apache-2.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   ### SITES
20   servers:
21     managed:
22       ### DEFAULT
23       arvados_workbench2_default.conf:
24         enabled: true
25         overwrite: true
26         config:
27           - server:
28             - server_name: workbench2.fixme.example.net
29             - listen:
30               - 80
31             - location /.well-known:
32               - root: /var/www
33             - location /:
34               - return: '301 https://$host$request_uri'
35
36       arvados_workbench2_ssl.conf:
37         enabled: true
38         overwrite: true
39         requires:
40           file: nginx_snippet_arvados-snakeoil.conf
41         config:
42           - server:
43             - server_name: workbench2.fixme.example.net
44             - listen:
45               - 443 http2 ssl
46             - index: index.html index.htm
47             - location /:
48               - root: /var/www/arvados-workbench2/workbench2
49               - try_files: '$uri $uri/ /index.html'
50               - 'if (-f $document_root/maintenance.html)':
51                 - return: 503
52             - location /config.json:
53               - return: {{ "200 '" ~ '{"API_HOST":"fixme.example.net"}' ~ "'" }}
54             - include: 'snippets/ssl_hardening_default.conf'
55             - include: 'snippets/arvados-snakeoil.conf'
56             - access_log: /var/log/nginx/workbench2.fixme.example.net.access.log combined
57             - error_log: /var/log/nginx/workbench2.fixme.example.net.error.log