I love Laravel Forge's quick deploy scripts. Forge allows you to set up a deploy script in their web interface and run it when you push to a git branch. However, I generally prefer to keep orchestration in the git repository. It's nice to have history, and I don't want to visit Forge whenever I want to make a change to the deploy script.
An elegant solution: move the script to a file. I created a
deploy.sh and call it from Forge.
Today I set up a static documentation site (built with Hugo) for internal use. Since it contains sensitive information, I wanted to add some sort of password protection.
We don't need any dynamic user management for this, so I decided to store an encrypted password on the server with
htpasswd and enable basic authentication with nginx.
Here's how I set up basic HTTP authentication on a Laravel Forge provisioned Ubuntu server.
I just upgraded Node.js on a Laravel Forge provisioned Ubuntu server for the umptieth time. I can never remember how to upgrade to a higher major Node.js version, so I'm documenting the process for future me.
Headless Chrome to the rescue! Chrome can run as a cli tool, and print a pdf file from a url. All I had to do was make some layout tweaks to make everything printer-friendly.