IncrelogEMS - Linux Shared Hosting Deployment Package ===================================================== Complete, ready-to-run production package for Linux hosting. Dependencies (node_modules) are INCLUDED - no npm install, no npm run build needed on the server. Unzip and start. REQUIREMENT ----------- Node.js 20+ available on the server (cPanel "Setup Node.js App", Plesk Node.js, or a plain shell). *********************************************************** * DEPLOY CORRECTLY - READ THIS FIRST * *********************************************************** The #1 cause of a 503 / "no production build found * * (.next/BUILD_ID missing)" error is EXTRACTING THIS ZIP * * OVER AN OLD DEPLOYMENT: unzipping never deletes old * * files, so a stale app.js from a previous attempt keeps * * running. * * * * ALWAYS: 1. EMPTY the application folder completely * * 2. THEN upload + extract this zip * *********************************************************** QUICK CHECK AFTER EXTRACTING (no SSH needed) -------------------------------------------- cPanel "Setup Node.js App" -> your app -> "Run NPM Script": verify The output prints PASS/FAIL for every part of the deployment (current app.js, compiled build, .env, node_modules, Linux Prisma engines, no stale files) plus the build id. Also: when the app starts, its banner prints a Build id, e.g. Build: WZfkmgMllWKdf18o504fq If the output you see does NOT show a Build line, or shows a message mentioning ".next" or port 3007, an OLD app.js is still in the folder - empty it and re-extract this package. WHAT IS DIFFERENT FROM THE WINDOWS PACKAGE ------------------------------------------ * start-server.sh replaces start-server.bat (same auto-restart supervisor via scripts/serve.js) * no web.config (that file is IIS-only) * Prisma client pre-generated with engine binaries for common Linux platforms: Debian/Ubuntu (openssl 1.1 + 3.0), RHEL family (AlmaLinux / CloudLinux / CentOS, openssl 1.1 + 3.0) and Alpine/musl - the right engine is picked automatically at runtime * sharp (image optimizer) is not included - the app does not use next/image, so it is not needed HOW TO START (choose one) ------------------------- 1. Shell / VPS: bash start-server.sh (or simply: node app.js) Listens on the port from .env (PORT=3011) unless the PORT environment variable is set - a real environment variable always overrides the .env file. 2. cPanel "Setup Node.js App": - Application root: this unzipped folder (must directly contain app.js) - Application startup file: app.js - Node version: 20 or 22 - Do NOT run npm install or npm run build - After any change: click Restart (or create the file tmp/restart.txt in the app folder) 3. Plesk (Node.js extension) / Passenger: - Document/application root: this folder - Startup file: app.js - Passenger passes its own PORT environment variable - the app honors it automatically (environment beats the .env file). IMPORTANT: the entry file is app.js in the ROOT of this folder. Do NOT use public/app.js - that is only a browser theme script (sidebar behaviour), not the server. HOW TO VERIFY IT IS RUNNING --------------------------- Open: https://:/health/ready Expected response: {"status":"ok","checks":{"database":"up"}} DATABASE -------- The production MySQL connection is already configured in .env (component-style DB_HOST / DB_USER / DB_PASSWORD / DB_NAME variables; the server composes them into DATABASE_URL at boot). FIRST LOGIN ----------- Central panel: admin@increlogems.com / Admin@123 Change this password immediately after first login (Central panel -> Tools -> Profile). FOLDER NOTES ------------ build/ compiled Next.js production bundle (this is the ".next" content - renamed via distDir in next.config.js; do NOT rename it to .next) server/ operational layer (security headers, compression, rate limiting, health probes) .env PRODUCTION configuration - keep private, contains real credentials node_modules/ pre-installed incl. Linux Prisma engines src/ full source tree (src/app/api is scanned at boot) SECURITY: this package contains real production credentials in .env. Keep the zip and the unzipped folder private.