Tangible Bytes

A Web Developer’s Blog

Laravel Frankenphp Octane Sail

My Laravel project is in part a headless CMS - this means it has and API that gets called by a frontend system - with around 10 API requests per page view.

We can cache some of that - but sometimes caches are empty and the site still has to be responsive.

The meant I needed to optimise my Laravel site and after a few experiments I found that using [Laravel Octane]](https://laravel.com/docs/12.x/octane) with FrankenPHP gave me the performance boost I needed without needing any significant code change.

Read more ...

Windows 11 WSL2 and Docker Desktop

I’m a long time Linux user, and a big fan of Docker, Kubernetes, VMs, and containers.

While I love developing on Linux - I do sometimes find it frustrating that I don’t have the same level of access to the Microsoft suite on Linux.

A while ago I had to use a Windows laptop for a few days and tried out using WSL - so most of the time I’m in Linux - I didn’t entirely hate it so when it was time for an upgrade I decided to try the Windows route this time.

I’ve had my new machine for a little over a week now.

Read more ...

Docker, Firewalls, and Minikube

I’ve had a few problems with docker and firewalls and seem to get a “good enough” solution only to run into trouble again later having forgotten what I’ve done so far.

This is an attempt to make some notes and at least capture where I am up to.

TLDR

  • Disable dockers Iptables
  • Add some firewalld rules
  • Watch out if the Docker interface changes

https://dev.to/soerenmetje/how-to-secure-a-docker-host-using-firewalld-2joo

Read more ...

Postgresql Public Schema Docker Init

I am working on a postgresql database for a strapi CMS

I’ve taken over the project and when I try and start it I see this error.

create table "public"."strapi_migrations" 
    ("id" serial primary key,
     "name" varchar(255),
      "time" timestamp) 

- permission denied for schema public
Read more ...

Next.js Environment Variables

I’m running Next.js apps in production using Kubernetes - and I’ve inherited some setup that I didn’t fully understand so I’ve been investigating what is going on with environment variables.

My inherited system used a build per environment and bakes in configuration at that point.

I dislike this because …

Read more ...

PHP Docker for Dev

I’m staring a new PHP project and I wanted a clean docker image to work from.

I inherited one on my last project and wanted to improve image size, security and production alignment.

Read more ...