2 # Copyright (C) The Arvados Authors. All rights reserved.
4 # SPDX-License-Identifier: AGPL-3.0
6 {%- import_yaml "ssl_key_encrypted.sls" as ssl_key_encrypted_pillar %}
15 upstream grafana_upstream:
16 - server: '127.0.0.1:3000 fail_timeout=10s'
27 - server_name: grafana.__DOMAIN__
30 - location /.well-known:
33 - return: '301 https://$host$request_uri'
42 - server_name: grafana.__DOMAIN__
45 - index: index.html index.htm
47 - proxy_pass: 'http://grafana_upstream'
48 - proxy_read_timeout: 300
49 - proxy_connect_timeout: 90
50 - proxy_redirect: 'off'
51 - proxy_set_header: X-Forwarded-Proto https
52 - proxy_set_header: 'Host $http_host'
53 - proxy_set_header: 'X-Real-IP $remote_addr'
54 - proxy_set_header: 'X-Forwarded-For $proxy_add_x_forwarded_for'
55 - ssl_certificate: __CERT_PEM__
56 - ssl_certificate_key: __CERT_KEY__
57 - include: snippets/ssl_hardening_default.conf
58 {%- if ssl_key_encrypted_pillar.ssl_key_encrypted.enabled %}
59 - ssl_password_file: {{ '/run/arvados/' | path_join(ssl_key_encrypted_pillar.ssl_key_encrypted.privkey_password_filename) }}
61 - access_log: /var/log/nginx/grafana.__DOMAIN__.access.log combined
62 - error_log: /var/log/nginx/grafana.__DOMAIN__.error.log