Repository navigation
Installation on cPanel
This guide covers a typical cPanel hosting environment with Setup Node.js App, Application Manager, or a similar Node application interface.
In cPanel:
- Open the Node.js application manager.
- Create a new application.
- Select Node.js 22 if available.
- Set Production mode.
- Set the Application root to the Portfolio repository directory.
- Attach the required domain/subdomain.
- Configure the application startup method according to the provider's Node/Passenger integration.
The exact UI differs by hosting company.
Using SSH/Terminal:
git clone https://github.com/drnecrotix/Portfolio.git
cd PortfolioFor updates:
git checkout main
git pull --ff-onlyDefine production variables in the cPanel Node application environment.
Example:
NODE_ENV=production
NEXT_PUBLIC_SITE_URL=https://your-domain.example
DATABASE_URL=postgresql://USER:PASSWORD@HOST:5432/DATABASE?schema=public
AUTH_SECRET=your-long-production-secretIf the hosting plan has a small PostgreSQL connection limit, consider the project's shared-hosting settings:
connection_limit=1&pool_timeout=20
Add integration-specific secrets separately.
Never place secrets in Git-tracked source files.
npm cinpx prisma generate
npx prisma validate
npx prisma migrate status
npx prisma migrate deployUse migrate deploy in production.
npm run production:preflightFix missing variables before building.
Try the standard build:
npm run buildIf the hosting provider uses a CloudLinux/N0C-like environment where native SWC fails, the repository includes:
npm run build:n0cUse the cPanel Restart Application action after:
- changing environment variables;
- pulling a new release;
- rebuilding;
- deploying migrations when the application needs a fresh process.
Check:
- public Home;
- Blog;
- Projects;
- Gallery;
- Admin login;
- Media Library;
- database connectivity;
- server error log;
- Admin Updater version.
If cPanel points to a parent/old directory, the Node process can run another copy of the site while SSH commands are executed elsewhere.
Confirm the exact application root before deployment.
The Node manager may have its own environment. Configure variables there and restart the application.
Check:
- startup configuration;
-
.htaccessor Apache proxy rules; - Node version;
- build output;
- application logs;
- missing environment variables.
Shared cPanel hosting may have a build memory limit. Possible solutions:
- build during lower load;
- use the provider-supported compatible Node version;
- use
npm run build:n0cwhen the problem is SWC-specific; - upgrade the hosting resource limit if the process is genuinely OOM-killed.
Use the shared Prisma singleton already present in the project and keep connection pool settings appropriate for the host.
git checkout main
git pull --ff-only
npm ci
npx prisma generate
npx prisma migrate deploy
npm run production:preflight
npm run buildUse npm run build:n0c instead of the normal build only when the hosting environment requires it. Restart the application afterward.