Tangible Bytes

A Web Developer’s Blog

2023 Archive

Posts from 2023

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 ...

Golang Prometheus Exporter Raspberry Pi

I have solar panels that are over 10 years old and I wanted to check if performance is degrading

I used an Open Source tool (SBFSpot) to grab some data from the inverter over bluetooth and so it has to be physically near the inverter and runs on a Raspberry Pi

So far so good - I have nice graphs at https://pvoutput.org

But I really wanted grafana graphs it is such a powerful dataviz tool

For that I needed to get the data to Prometheus

Read more ...

Names vs Security

Since LastPass’ most recent security issues (do use a password manager but not LastPass) I’ve seen a lot of people online changing all their passwords and realising how bad the experience is.

For those of us with names which can be spelled in the limited ASCII alphabet the pain point is the password part - where the rules can be annoying but in the end we can work around them.

Today I saw a post Hello my name is St�phanie which highlights how there is a bigger problem for many people.

It all got me thinking : why do we (developers) do this ?

Read more ...

Project Documentation

Have you ever been involved in a project that has been running for months and now every time you have a discussion people say “we have done this already” ?

The problem is often that the discussions have not been documented - and the meetings need to be repeated.

So what are the best tools and processes to escape the meeting cycle and deliver quality?

Read more ...

Laravel Database Privileges

Laravel has some really good features for setting database connections - but oddly this isn’t spelled out in the documentation.

Databases (especially in Docker containers) often come by default with a single, powerful, user account.

As a result all too often people run Laravel without considering the principle of least privilege.

By following a few simple steps we can enhance security.

Read more ...