Skip to content

v1.8.0

Choose a tag to compare

@hesami hesami released this 08 Nov 11:12
· 1 commit to main since this release

Release Notes — v1.8.0

PostgreSQL Support & Brotli Compression

This release brings two additions: PostgreSQL support alongside MariaDB, selectable per project, and optional Brotli compression for Nginx. hideploy.sh and README.md are updated.


PostgreSQL alongside MariaDB

You can now choose the database engine per project.

  • Installation: Menu 2 → 7. If a project selects PostgreSQL and it is not installed, the script offers to install it.
  • Choosing the engine: The deploy wizard and "Add a database" ask whether to use MariaDB or PostgreSQL. The default for Laravel is MariaDB and for Next.js is PostgreSQL.
  • Environment files: Laravel gets DB_CONNECTION=pgsql on port 5432; Next.js gets DATABASE_URL=postgresql://....
  • Isolation: Each project has its own database and user, and a project's user cannot connect to another project's database.
  • Full support: Import, restore (REPLACE and ADD modes), backup, project deletion, and encrypted nightly backups work for both engines. Projects with different engines that share a name keep their files separate (db-pg-<name>).
  • Restore safety: A MySQL dump imported into PostgreSQL (or the reverse) is rejected with a clear message. PostgreSQL imports either complete fully or change nothing.
  • Existing projects stay on MariaDB with no changes.
  • Laravel Dockerfile: The pdo_pgsql extension is included in the new template. Existing Laravel projects that want PostgreSQL need to regenerate and push their Dockerfile (Menu 3); the script warns you about this.

Brotli Compression

Brotli is available from Menu 2 → 8.

  • Building the image: The script compiles an image from official nginx plus the ngx_brotli modules on your server, which takes 2–5 minutes while sites keep running. You can also point it at your own image, such as nginx-brotli:latest.
  • Safe and reversible: Before switching, the full nginx config is tested with the new image in a temporary container. If the container fails to start or nginx rejects the config, everything reverts automatically. Disabling Brotli is equally reversible.
  • Next.js: If the app gzips on its own, Brotli is never applied. For this reason, vhosts are set up so nginx handles compression, with gzip kept for older browsers.
  • Menu options: Test on a site (showing actual size without compression, with gzip, and with Brotli), rebuild with the latest versions, and adjust the compression level.

On a real sample, Brotli came out about 7.6% smaller than gzip. On minified JS and CSS the gain is usually larger, around 10–25%. It is a useful and noticeable improvement, especially on mobile, but not magic.


What Has Not Been Tested Yet

The development sandbox has no Docker, so two steps will run for the first time on your server:

  • The actual Docker image build and startup of the postgres:17-bookworm container.
  • Fetching ngx_brotli from GitHub and compiling it inside Docker.

Everything else was tested with real tools: real PostgreSQL 16 and MariaDB 10.11, and real nginx with Brotli modules compiled locally. All tests pass (around 360 in total), including 54 PostgreSQL tests and 27 MariaDB regression tests. A long-hidden bug was also found and fixed: the safety-backup filename could overwrite the file being restored before the restore finished.


Suggested First Run

Start with a test project. The order is: 2 → 7 (install PostgreSQL), create a new project with PostgreSQL, then 2 → 8 (Brotli), and finally "Test it on a site". If you see an error, please share the message.


Upgrade

Replace hideploy.sh and README.md on GitHub and tag v1.8.0. On the server:

sudo hideploy update

Then hideploy --version should show 1.8.0.