fix: standalone start script copies static files automatically

- scripts/start.js: copies .next/static to .next/standalone/.next/static
  before launching the standalone server (prevents CSS 404)
- package.json: start script now uses scripts/start.js
- Dockerfile: removed fragile manual better-sqlite3 copy
  (already included in standalone output)
- scripts/setup.sh: added local prod option for npm start
This commit is contained in:
renato97
2026-07-23 16:25:52 -03:00
parent 25449aa5df
commit 4e9f815a53
4 changed files with 58 additions and 11 deletions
+15 -6
View File
@@ -13,22 +13,31 @@ fi
echo ""
echo "Choose install method:"
echo " 1) Local (npm run dev)"
echo " 2) Docker Compose"
echo " 1) Local dev (npm run dev)"
echo " 2) Local prod (npm run build && npm start)"
echo " 3) Docker Compose (producción)"
echo ""
read -rp "Method [1/2]: " method
read -rp "Method [1/2/3]: " method
if [ "$method" = "2" ]; then
if [ "$method" = "3" ]; then
echo ""
echo "=== Docker build & start ==="
docker compose up -d --build
echo ""
echo "Web running at http://localhost:3000"
elif [ "$method" = "2" ]; then
echo ""
echo "=== Local prod build ==="
npm install
npm run build
echo ""
echo "Run: npm start"
echo "Web running at http://localhost:3000"
else
echo ""
echo "=== Local install ==="
echo "=== Local dev ==="
npm install
echo ""
echo "Run: npm run dev"
echo "Or: npm run build && npm start"
echo "Web running at http://localhost:3000"
fi