From 760bc2d0b5b52a089cd70cb7a250a922a327b5a2 Mon Sep 17 00:00:00 2001 From: onyxstarwave <143672078+onyxstarwave@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:24:23 -0600 Subject: [PATCH 1/3] Update install.sh removed line 4 because it mostly repeats line 1 and does not work as a curl command. added 'npm' to line 8 because for some reason it didn't install as expected, causing the script to be unsuccessful. --- ops/install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ops/install.sh b/ops/install.sh index d2da2aae..edf05e24 100644 --- a/ops/install.sh +++ b/ops/install.sh @@ -1,12 +1,11 @@ apt install libpam0g-dev build-essential redis-server luarocks --no-install-recommends wget gnupg ca-certificates curl git -y -curl sudo apt-get update && sudo apt-get install -y ca-certificates curl gnupg curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg NODE_MAJOR=20 echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list -sudo apt-get install -y nodejs +sudo apt-get install -y nodejs npm echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list From 7b274b829bc520baa8b111fc737fc3aca0d936a9 Mon Sep 17 00:00:00 2001 From: onyxstarwave <143672078+onyxstarwave@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:36:33 -0600 Subject: [PATCH 2/3] Update install.sh added line 9 because running the script in its current state results in 'Command 'npm' not found, but can be installed with: apt install npm' error --- ops/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ops/install.sh b/ops/install.sh index edf05e24..93abbba7 100644 --- a/ops/install.sh +++ b/ops/install.sh @@ -5,7 +5,8 @@ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg NODE_MAJOR=20 echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list -sudo apt-get install -y nodejs npm +sudo apt-get install -y nodejs +sudo apt-get install -y npm echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list From 67a548d5eae3d2a6b4fc9e5228f04aa2ce258f2a Mon Sep 17 00:00:00 2001 From: onyxstarwave <143672078+onyxstarwave@users.noreply.github.com> Date: Tue, 24 Jun 2025 03:56:52 -0600 Subject: [PATCH 3/3] Update install.sh formatting --- ops/install.sh | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/ops/install.sh b/ops/install.sh index 93abbba7..7644b0a1 100644 --- a/ops/install.sh +++ b/ops/install.sh @@ -1,51 +1,39 @@ +apt -y install libpam0g-dev build-essential redis-server luarocks --no-install-recommends wget gnupg ca-certificates curl git -apt install libpam0g-dev build-essential redis-server luarocks --no-install-recommends wget gnupg ca-certificates curl git -y - -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg NODE_MAJOR=20 -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list - -sudo apt-get install -y nodejs -sudo apt-get install -y npm - -echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list - -sudo apt-get -y install --no-install-recommends wget gnupg ca-certificates #cert - -wget -O - https://openresty.org/package/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/openresty.gpg #importing gpg key - -echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openresty.gpg] http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list > /dev/null +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list -sudo apt-get update +apt-get install -y nodejs +apt-get install -y npm -sudo apt-get -y install openresty +wget -O - https://openresty.org/package/pubkey.gpg | gpg --dearmor -o /usr/share/keyrings/openresty.gpg #importing gpg key +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openresty.gpg] http://openresty.org/package/ubuntu $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/openresty.list > /dev/null +apt-get update +apt-get -y install openresty -sudo luarocks install lua-resty-auto-ssl -sudo luarocks install luasocket +luarocks install lua-resty-auto-ssl +luarocks install luasocket mkdir /etc/ssl/ - openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj '/CN=sni-support-required-for-valid-ssl' -keyout /etc/ssl/resty-auto-ssl-fallback.key -out /etc/ssl/resty-auto-ssl-fallback.crt - openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj '/CN=sni-support-required-for-valid-ssl' -keyout /etc/ssl/resty-auto-ssl-fallback.key -out /etc/ssl/resty-auto-ssl-fallback.crt mkdir /etc/openresty/sites-enabled/ wget -q https://raw.githubusercontent.com/theta42/proxy/refs/heads/master/ops/nginx_conf/nginx.conf -O /etc/openresty/nginx.conf -wget -q https://raw.githubusercontent.com/theta42/t42-common/master/templates/openresty/autossl.conf.erb -O /etc/openresty/autossl.conf +wget -q https://raw.githubusercontent.com/theta42/t42-common/master/templates/openresty/ +autossl.conf.erb -O /etc/openresty/autossl.conf wget -q https://raw.githubusercontent.com/theta42/t42-common/master/templates/openresty/010-proxy.conf.erb -O /etc/openresty/sites-enabled/000-proxy wget -q https://raw.githubusercontent.com/theta42/proxy/master/ops/proxy.service -O /etc/systemd/system/proxy.service mkdir /var/log/nginx mkdir /var/www - cd /var/www - git clone https://github.com/theta42/proxy.git cd proxy/nodejs npm install - wget -q https://raw.githubusercontent.com/theta42/proxy/refs/heads/master/ops/nginx_conf/targetinfo.lua -O /usr/local/openresty/lualib/targetinfo.lua systemctl start proxy.service