From 8861f1747ce0c9f1ba8d9792029b5ae260ea142d Mon Sep 17 00:00:00 2001 From: David Merfield Date: Fri, 6 Oct 2023 15:16:11 +0100 Subject: [PATCH] Updates workflows --- .github/workflows/proxy-tests.yml | 2 ++ config/openresty/build-config.js | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/proxy-tests.yml b/.github/workflows/proxy-tests.yml index fd5286a9f38..90e99262802 100644 --- a/.github/workflows/proxy-tests.yml +++ b/.github/workflows/proxy-tests.yml @@ -54,6 +54,8 @@ jobs: NODE_PATH: /home/runner/work/Blot/Blot/app NODE_SERVER_IP: 127.0.0.1 REDIS_IP: 127.0.0.1 + SSL_CERTIFICATE: /home/runner/work/Blot/Blot/config/openresty/data/selfsigned.crt + SSL_CERTIFICATE_KEY: /home/runner/work/Blot/Blot/config/openresty/data/selfsigned.key run: | node config/openresty/build-config.js cat config/openresty/data/openresty.conf diff --git a/config/openresty/build-config.js b/config/openresty/build-config.js index ceceb86af97..0bba0932e9c 100644 --- a/config/openresty/build-config.js +++ b/config/openresty/build-config.js @@ -22,8 +22,10 @@ const locals = { // if you change the cache directory, you must also update the // script mount-instance-store.sh cache_directory: "/var/www/cache", - ssl_certificate: "/etc/ssl/private/letsencrypt-domain.pem", - ssl_certificate_key: "/etc/ssl/private/letsencrypt-domain.key" + ssl_certificate: + process.env.SSL_CERTIFICATE || "/etc/ssl/private/letsencrypt-domain.pem", + ssl_certificate_key: + process.env.SSL_CERTIFICATE_KEY || "/etc/ssl/private/letsencrypt-domain.key" }; if (!NODE_SERVER_IP) throw new Error("NODE_SERVER_IP not set");