Add workbench2, and make it the default.
[arvados-k8s.git] / charts / arvados / config / workbench / nginx.conf
index b2e59cfbf801b331c2144bdbe785c19ac1cce6b2..298788dba46060a0487fe24150b9103d13f9e05c 100644 (file)
@@ -25,7 +25,7 @@ upstream workbench {
 proxy_http_version 1.1;
 
 server {
-  listen       0.0.0.0:443 ssl;
+  listen       0.0.0.0:445 ssl;
   server_name  public-workbench;
 
   ssl on;
@@ -49,3 +49,24 @@ server {
     proxy_set_header      X-Forwarded-For $proxy_add_x_forwarded_for;
   }
 }
+
+server {
+  listen       0.0.0.0:443 ssl;
+  server_name  public-workbench2;
+
+  ssl on;
+  ssl_certificate     /etc/ssl/certs/workbench.pem;
+  ssl_certificate_key /etc/ssl/private/workbench.key;
+
+  # Workbench2 uses a call to /config.json to bootstrap itself
+  # and find out where to contact the API server.
+  location /config.json {
+    return 200 '{ "API_HOST": "{{ .Values.externalIP }}:444" }';
+  }
+
+  location / {
+    root      /var/www/arvados-workbench2/workbench2;
+    index     index.html;
+    try_files $uri $uri/ /index.html;
+  }
+}