@@ -28,13 +28,14 @@ function update_script() {
2828 exit
2929 fi
3030
31- if ! command -v pnpm & > /dev/null; then
32- msg_info " Installing pnpm"
33- # export NODE_OPTIONS=--openssl-legacy-provider
34- $STD npm install -g
[email protected] 35- msg_ok " Installed pnpm"
31+ if ! command -v yarn & > /dev/null; then
32+ msg_info " Installing Yarn"
33+ $STD npm install -g yarn
34+ msg_ok " Installed Yarn"
3635 fi
3736
37+ export NODE_OPTIONS=" --openssl-legacy-provider"
38+
3839 RELEASE=$( curl -fsSL https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest |
3940 grep " tag_name" |
4041 awk ' {print substr($2, 3, length($2)-4) }' )
@@ -49,9 +50,10 @@ function update_script() {
4950 sed -i " s|\" version\" : \" 0.0.0\" |\" version\" : \" $RELEASE \" |" backend/package.json
5051 sed -i " s|\" version\" : \" 0.0.0\" |\" version\" : \" $RELEASE \" |" frontend/package.json
5152 cd ./frontend || exit
52- $STD pnpm install
53- $STD pnpm upgrade
54- $STD pnpm run build
53+ # Replace node-sass with sass in package.json before installation
54+ sed -i ' s/"node-sass".*$/"sass": "^1.92.1",/g' package.json
55+ $STD yarn install --network-timeout 600000
56+ $STD yarn build
5557 )
5658 msg_ok " Built Frontend"
5759
@@ -71,7 +73,7 @@ function update_script() {
7173
7274 msg_info " Setting up Environment"
7375 ln -sf /usr/bin/python3 /usr/bin/python
74- ln -sf /usr/ bin/certbot /opt/certbot /bin/certbot
76+ ln -sf /opt/certbot/ bin/certbot /usr/local /bin/certbot
7577 ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
7678 ln -sf /usr/local/openresty/nginx/ /etc/nginx
7779 sed -i ' s+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf
@@ -113,7 +115,12 @@ function update_script() {
113115 cp -r frontend/app-images/* /app/frontend/images
114116 cp -r backend/* /app
115117 cp -r global/* /app/global
116- $STD python3 -m pip install --no-cache-dir --break-system-packages certbot-dns-cloudflare
118+
119+ # Update Certbot and plugins in virtual environment
120+ if [ -d /opt/certbot ]; then
121+ $STD /opt/certbot/bin/pip install --upgrade pip setuptools wheel
122+ $STD /opt/certbot/bin/pip install --upgrade certbot certbot-dns-cloudflare
123+ fi
117124 msg_ok " Setup Environment"
118125
119126 msg_info " Initializing Backend"
@@ -134,7 +141,8 @@ function update_script() {
134141EOF
135142 fi
136143 cd /app || exit
137- $STD pnpm install
144+ export NODE_OPTIONS=" --openssl-legacy-provider"
145+ $STD yarn install --network-timeout 600000
138146 msg_ok " Initialized Backend"
139147
140148 msg_info " Starting Services"
0 commit comments