Repository navigation
v1.3.0
Release Notes — v1.3.0
Next.js Deployment & Nginx Performance Tuning
This release adds support for deploying Next.js projects and introduces an interactive performance tuning section for Nginx, MariaDB, and PHP-FPM. hideploy.sh is bumped to 1.3.0 and README.md is updated.
Testing status: Tests were simulated. A real Docker build for Next.js and a real GitLab pipeline have not been run yet — try it on a low-importance Next.js project first.
Next.js
- Project type selection: Menu 4 now asks for the project type (Laravel or Next.js). Menu 3 generates the Next.js-specific files.
- Package manager: pnpm is the default (with build cache). If the project has a
package-lock.json, the wizard detects it and guides migration viapnpm import. npm and yarn are also supported. - Containerized runtime: Each project runs one container serving the standalone output. Code lives inside the image, unlike Laravel which stays on disk.
- Safer deploys: A new image is built while the current version keeps serving. If the build fails, the previous version stays online (verified in simulated testing).
- Project requirements:
output: 'standalone'innext.configand a committed lock file. The wizard checks both and reports what to fix. - Environment variables:
.envstays on the server and is read by the container at startup.NEXT_PUBLIC_*variables are baked into the code at build time, so changing them requires a redeploy. Write$as$$. - Optional database:
DATABASE_URLandDB_*variables are written. Backup, restore, SSL, rollback, and disk cleanup all work the same for Next.js. - RAM: Runtime needs roughly 256–512 MB, but builds need about 1 GB (enable swap on low-memory servers).
Performance Tuning (main menu, option 7)
Nothing is applied automatically. Until you apply it, nginx and existing containers stay exactly as before. Verified that nginx output for Laravel sites without these settings is identical to the previous version.
- Server scan: Reads CPU cores, RAM, swap, disk type, and project memory, then suggests a value for each setting. Accept with Enter or enter a custom number.
- Nginx tuning: Compression level, keep-alive, file-info caching, browser caching for Laravel static files, and nginx caching for
/_next/static/in Next.js. Tested with real nginx and a test server: a static file was MISS on first request and HIT on the second. When the container was down it was still served from cache, and pages got the maintenance page with a 503. nginx tests the config before applying and rolls back if it fails; option 6 reverts everything. - MariaDB tuning: Memory, connection count, and
skip-name-resolve— the latter is the prime suspect for the ~5 second delay. The database restarts for 10–30 seconds, so the script asks for confirmation first and restores the previous setting if it does not come back healthy. - PHP-FPM tuning for Laravel: Dynamic mode keeps workers warm so the first request after idle is not slow.
- Slowdown diagnosis: Measures DNS, connect, time-to-first-byte, and database connection per site, and reports whether the problem is cold start, slow database, slow code, or DNS/IPv6/network.
Root-causing the 5-second delay
After one minute idle, run option 5 and look at the result, then apply option 3 or option 4 based on it. Share the option 5 output so we can confirm.
Upgrade
Replace hideploy.sh and README.md on GitHub and tag v1.3.0. On the server:
sudo hideploy updateThen hideploy --version should show 1.3.0.
Testing Status
Tests were simulated. A real Docker build for Next.js and a real GitLab pipeline have not been run yet — try it on a low-importance Next.js project first. If you hit an error, share the message.