forked from maik/IPFS-portal
fix: replace recursive npm start chain with next start + pm2 bootstrap script
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev --port 3445",
|
"dev": "next dev --port 3445",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "npm install && npm run build && next start",
|
"start": "next start",
|
||||||
"export": "next build && npx serve out"
|
"export": "next build && npx serve out"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -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"
|
||||||
Reference in New Issue
Block a user