@powerhousedao/ph-cli 2.5.0-dev.7 → 2.5.0-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.json
CHANGED
|
@@ -168,6 +168,16 @@ EOF
|
|
|
168
168
|
echo "Obtaining SSL certificates..."
|
|
169
169
|
sudo certbot --nginx -d $connect_domain -d $switchboard_domain --non-interactive --agree-tos --email $admin_email --redirect
|
|
170
170
|
|
|
171
|
+
# Wait for certbot to finish and certificates to be installed
|
|
172
|
+
sleep 5
|
|
173
|
+
|
|
174
|
+
# Check if certificates were installed
|
|
175
|
+
if [ ! -f "/etc/letsencrypt/live/$connect_domain/fullchain.pem" ]; then
|
|
176
|
+
echo "Error: SSL certificates were not installed properly"
|
|
177
|
+
echo "Please check the certbot logs at /var/log/letsencrypt/letsencrypt.log"
|
|
178
|
+
exit 1
|
|
179
|
+
fi
|
|
180
|
+
|
|
171
181
|
# Update Nginx configuration with proper SSL settings
|
|
172
182
|
echo "Updating Nginx configuration with SSL settings..."
|
|
173
183
|
sudo tee /etc/nginx/sites-available/$PROJECT_NAME > /dev/null << EOF
|
|
@@ -182,6 +192,9 @@ server {
|
|
|
182
192
|
http2 on;
|
|
183
193
|
server_name $connect_domain;
|
|
184
194
|
|
|
195
|
+
ssl_certificate /etc/letsencrypt/live/$connect_domain/fullchain.pem;
|
|
196
|
+
ssl_certificate_key /etc/letsencrypt/live/$connect_domain/privkey.pem;
|
|
197
|
+
|
|
185
198
|
# SSL configuration
|
|
186
199
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
187
200
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
|
@@ -217,6 +230,9 @@ server {
|
|
|
217
230
|
http2 on;
|
|
218
231
|
server_name $switchboard_domain;
|
|
219
232
|
|
|
233
|
+
ssl_certificate /etc/letsencrypt/live/$connect_domain/fullchain.pem;
|
|
234
|
+
ssl_certificate_key /etc/letsencrypt/live/$connect_domain/privkey.pem;
|
|
235
|
+
|
|
220
236
|
# SSL configuration
|
|
221
237
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
222
238
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
|
@@ -323,8 +339,10 @@ EOF
|
|
|
323
339
|
# =============================================================================
|
|
324
340
|
pnpm prisma db push --schema node_modules/document-drive/dist/prisma/schema.prisma
|
|
325
341
|
|
|
326
|
-
#
|
|
327
|
-
|
|
342
|
+
# Check if security headers and compression settings are already present
|
|
343
|
+
if ! grep -q "Strict-Transport-Security" /etc/nginx/nginx.conf; then
|
|
344
|
+
# Add global security headers and compression settings to main nginx.conf
|
|
345
|
+
sudo tee -a /etc/nginx/nginx.conf > /dev/null << EOF
|
|
328
346
|
|
|
329
347
|
# Global security headers
|
|
330
348
|
add_header Strict-Transport-Security "max-age=63072000" always;
|
|
@@ -337,6 +355,9 @@ brotli_comp_level 6;
|
|
|
337
355
|
brotli_types text/plain text/css application/javascript application/json image/svg+xml application/xml+rss;
|
|
338
356
|
brotli_static on;
|
|
339
357
|
EOF
|
|
358
|
+
else
|
|
359
|
+
echo "Security headers and compression settings already present in nginx.conf"
|
|
360
|
+
fi
|
|
340
361
|
|
|
341
362
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
342
363
|
echo " Environment setup complete!"
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "2.5.0-dev.
|
|
1
|
+
export declare const version = "2.5.0-dev.8";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/src/version.js
CHANGED