1
0
forked from maik/IPFS-portal

fix: replace recursive npm start chain with next start + pm2 bootstrap script

This commit is contained in:
maikrolf
2026-06-28 22:00:00 +02:00
parent a89841a742
commit a8a9d33f36
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
"scripts": {
"dev": "next dev --port 3445",
"build": "next build",
"start": "npm install && npm run build && next start",
"start": "next start",
"export": "next build && npx serve out"
},
"dependencies": {
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
# IPFS-Portal PM2 start script — runs from /srv/apps/ipfs-portal
# Usage: pm2 start start-pm2.sh --name ipfs-portal
set -e
cd /srv/apps/ipfs-portal || { echo "ERROR: /srv/apps/ipfs-portal not found"; exit 1; }
echo "=== npm install ==="
npm install
echo "=== npm run build ==="
npm run build
echo "=== next start port ${PORT:=3005} ==="
exec npx next start --port "$PORT"