From c03b839c7ee75f0e6243b15e6dcb2be86710f35f Mon Sep 17 00:00:00 2001 From: Alexander Goncharenko Date: Tue, 8 Aug 2023 16:06:41 +0300 Subject: [PATCH] fix: helm installation --- charts/brokencrystals/Chart.yaml | 2 +- .../templates/bc-prod-proxy-deployment.yaml | 2 +- .../templates/nginx-proxy-config.yaml | 20 ++++++++++++------- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/charts/brokencrystals/Chart.yaml b/charts/brokencrystals/Chart.yaml index 88b063c9..47dab204 100644 --- a/charts/brokencrystals/Chart.yaml +++ b/charts/brokencrystals/Chart.yaml @@ -4,7 +4,7 @@ description: | Benchmark application that uses modern technologies and implements a set of common security vulnerabilities type: application -version: 0.0.23 +version: 0.0.24 keywords: - brokencrystals - brkn diff --git a/charts/brokencrystals/templates/bc-prod-proxy-deployment.yaml b/charts/brokencrystals/templates/bc-prod-proxy-deployment.yaml index 46731ef7..a750fa62 100644 --- a/charts/brokencrystals/templates/bc-prod-proxy-deployment.yaml +++ b/charts/brokencrystals/templates/bc-prod-proxy-deployment.yaml @@ -55,7 +55,7 @@ spec: value: "https://raw.githubusercontent.com/NeuraLegion/brokencrystals/development/config/keys/x509.crt" volumeMounts: - name: {{ include "brokencrystals.fullname" . }}-nginx-proxy - mountPath: /etc/nginx/conf.d/default.conf + mountPath: /etc/nginx/conf.d/certbot.conf subPath: default.conf readOnly: true resources: diff --git a/charts/brokencrystals/templates/nginx-proxy-config.yaml b/charts/brokencrystals/templates/nginx-proxy-config.yaml index 4c0ac7cb..51b2b0f1 100644 --- a/charts/brokencrystals/templates/nginx-proxy-config.yaml +++ b/charts/brokencrystals/templates/nginx-proxy-config.yaml @@ -7,7 +7,12 @@ data: # /etc/nginx/conf.d/default.conf default.conf: | server { - listen 80; + listen [::]:443 ssl ipv6only=on; # managed by Certbot + listen 443 ssl; # managed by Certbot + + server_name brokencrystals.com; + ssl_certificate /etc/letsencrypt/live/brokencrystals.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/brokencrystals.com/privkey.pem; root /var/www/html; @@ -22,26 +27,26 @@ data: } location /api { - proxy_pass http://{{ include "brokencrystals.fullname" . }}-nodejs:3000; + proxy_pass http://nodejs:3000; } location /swagger { - proxy_pass http://{{ include "brokencrystals.fullname" . }}-nodejs:3000; + proxy_pass http://nodejs:3000; } location /graphiql { - proxy_pass http://{{ include "brokencrystals.fullname" . }}-nodejs:3000; + proxy_pass http://nodejs:3000; } location /graphql { - proxy_pass http://{{ include "brokencrystals.fullname" . }}-nodejs:3000; + proxy_pass http://nodejs:3000; } location /put.raw { rewrite put.raw /api/file/raw?path=./gil.txt break; - proxy_pass http://{{ include "brokencrystals.fullname" . }}-nodejs:3000; + proxy_pass http://nodejs:3000; } - + location ~* ^/(config\.js|config\.json|\.htaccess|\.env|\.nginx\.conf|\.robots\.txt)$ { allow all; log_not_found off; @@ -57,3 +62,4 @@ data: location = /50x.html { } } +