13c1da0c164338fde0bdab0039f52f08b308e054
[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         config:
40           - server:
41             - server_name: workbench2.fixme.example.net
42             - listen:
43               - 443 http2 ssl
44             - index: index.html index.htm
45             - location /:
46               - root: /var/www/arvados-workbench2/workbench2
47               - try_files: '$uri $uri/ /index.html'
48               - 'if (-f $document_root/maintenance.html)':
49                 - return: 503
50             - location /config.json:
51               - return: {{ "200 '" ~ '{"API_HOST":"fixme.example.net"}' ~ "'" }}
52             - include: 'snippets/ssl_hardening_default.conf'
53             # - include: 'snippets/letsencrypt.conf'
54             - include: 'snippets/ssl_snakeoil.conf'
55             - access_log: /var/log/nginx/workbench2.fixme.example.net.access.log combined
56             - error_log: /var/log/nginx/workbench2.fixme.example.net.error.log