Merge branch '20511-aborted-boot'
[arvados.git] / tools / salt-install / config_examples / multi_host / aws / pillars / nginx_workbench_configuration.sls
index 32904a12b2cd5cf87899ebe6f74cae534a513db2..013be704c84590d1c7ea02ad7a5a6757a1a247f6 100644 (file)
@@ -3,6 +3,8 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
+{%- import_yaml "ssl_key_encrypted.sls" as ssl_key_encrypted_pillar %}
+
 ### ARVADOS
 arvados:
   config:
@@ -28,7 +30,7 @@ nginx:
         overwrite: true
         config:
           - server:
-            - server_name: workbench.__CLUSTER__.__DOMAIN__
+            - server_name: workbench.__DOMAIN__
             - listen:
               - 80
             - location /:
@@ -41,7 +43,7 @@ nginx:
           __CERT_REQUIRES__
         config:
           - server:
-            - server_name: workbench.__CLUSTER__.__DOMAIN__
+            - server_name: workbench.__DOMAIN__
             - listen:
               - __CONTROLLER_EXT_SSL_PORT__ http2 ssl
             - index: index.html index.htm
@@ -57,8 +59,11 @@ nginx:
             - include: snippets/ssl_hardening_default.conf
             - ssl_certificate: __CERT_PEM__
             - ssl_certificate_key: __CERT_KEY__
-            - access_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__.access.log combined
-            - error_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__.error.log
+            {%- if ssl_key_encrypted_pillar.ssl_key_encrypted.enabled %}
+            - ssl_password_file: {{ '/run/arvados/' | path_join(ssl_key_encrypted_pillar.ssl_key_encrypted.privkey_password_filename) }}
+            {%- endif %}
+            - access_log: /var/log/nginx/workbench.__DOMAIN__.access.log combined
+            - error_log: /var/log/nginx/workbench.__DOMAIN__.error.log
 
       arvados_workbench_upstream:
         enabled: true
@@ -71,5 +76,5 @@ nginx:
             - index:  index.html index.htm
             - passenger_enabled: 'on'
             # yamllint disable-line rule:line-length
-            - access_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__-upstream.access.log combined
-            - error_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__-upstream.error.log
+            - access_log: /var/log/nginx/workbench.__DOMAIN__-upstream.access.log combined
+            - error_log: /var/log/nginx/workbench.__DOMAIN__-upstream.error.log