Hi, I'm Harrison. I currently work at me&u as a software engineer. I enjoy golfing, gaming, tending to my veggie garden and playing with my dog Boots.

Recent Posts

Thursday, June 26, 2025

Docker

I've always had a bit of fear when needing to edit anything Docker related at work as I'm just not an expert in that space. Something however did click for me with it recently.

It originally revolved around some Linux command line tool that did not work on macOS that someone at work was talking about. The only way to make it work on a Mac was to use docker run.

After chatting with ChatGPT about the topic and "how to think" of Docker it came up with this summary:

A way to run software inside isolated, reproducible Linux environments — regardless of the host OS.

I think thinking of Docker as a way to be able to run Linux command line tools is simple and it makes sense as to why it's so popular.

I think back to this Guide To Deploying a Web App I wrote about a year ago and it was tricky to get nginx working right. I had to edit files in the Linux file system which is definitely not the right way to do things. This kind of setup isn't reproducible like it is with Docker. The whole ideology of Docker is that you can easily tear everything down and build it again and things just work as they did before.

This inspired me to build a little web app with Docker using Bun, PostgreSQL and nginx.

  1. You start with the Dockerfile that basically just copies the files it needs and runs the code
FROM oven/bun

WORKDIR /app
COPY ./hello-world-app ./
RUN bun install

CMD ["bun", "run", "index.ts"]

It's important to note that Docker has no reference to the Linux file system by default and this is a good thing for security reasons.

  1. I have a docker-compose.yml file which sets up the application, it pulls in the images it needs for the app to run, the directory name demo-bun-docker-app groups the 3 containers, when using a Docker GUI like Orbstack locally you can see how this grouping is done, we can hit localhost:8080 to access endpoints, the DATABASE_URL is a .env value the app is able to read
services:
  db:
    image: postgres:15
    restart: always
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: pass
      POSTGRES_DB: demo
    volumes:
      - db_data:/var/lib/postgresql/data
    ports:
      - "5432:5432"

  hello-world-app:
    build: .
    restart: always
    depends_on:
      - db
    environment:
      DATABASE_URL: postgres://user:pass@db:5432/demo

  nginx:
    image: nginx:alpine
    restart: always
    ports:
      - "8080:80"
    volumes:
      - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - hello-world-app

volumes:
  db_data:
  1. The app code is a rudimentary bun server
import { client } from './db';

const server = Bun.serve({
  port: 3000,
  async fetch(req) {
    const url = new URL(req.url);
    const nameRes = await client.query('SELECT name FROM people LIMIT 1');
    const name = nameRes.rows[0]?.name ?? 'World';

    return new Response(`<html><body><h1>Hello ${name}</h1></body></html>`, {
      headers: { 'Content-Type': 'text/html' },
    });
  },
});

console.log(`Server running on http://localhost:${server.port}`);
  1. It has a DB client file
import { Client } from 'pg';

export const client = new Client({
  connectionString: process.env.DATABASE_URL,
});

await client.connect();
  1. The nginx config lives in a /nginx/default.conf file, this is much better for the code to be here and committed to git rather than just being in the host machine file system (like I did here)
server {
    listen 80;

    location / {
        proxy_pass http://hello-world-app:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}
  1. To get access to the DB (and run any SQL) I can run this command
docker exec -it <postgres-container-name> psql -U user -d demo

to get the postgres-container-name I can run docker ps, find the postgres container and copy the name from the NAMES column, I can also just connect to the DB locally in a GUI like TablePlus using the DATABASE_URL

  1. Now that this is all setup you can develop locally and do your usual development work

  2. Where the real win comes in is deploying this on a cloud compute instance, there's a few steps but overall it's a relatively simple process:

    1. Buy an instance
    2. SSH into it
    3. Install docker and docker-compose
    4. Copy the code across to the instance
    5. Run the app in detached mode docker compose up -d --build
    6. Update the instance firewall with ufw
  3. You should now be able to access the app endpoints on the internet with http://<your-ip>:8080

  4. You would obviously want to use HTTPS but that would be easily done with Let's Encrypt and a quick tweak to the nginx config

The Duels#youtube.com

This is probably the most entertainment I've experienced from a LIV golf based product. They leant heavily on the YouTube golfers but why not? This is an excellent strategy from LIV and the PGA tour should realistically be doing something like this too.

There truely is no other sport where personality matters so much and can easily be captured on video whilst playing the sport.

Some Golf Tips#youtube.com

I think there are a few little nuggets in here that make a lot of sense.

  • Raising the back right foot slightly just before hitting your shot helps to hit more of a draw flight on a full shot
  • Placing your back foot further behind you helps to not go over the top or thin a chip, this is key more me as I'll hit a lot of chips throughout a round

Monday, June 23, 2025

Enhanced Games#podcasts.apple.com

I feel like I may have posted about Sports Bizarre a couple of times but this was another cracking episode.

The whole story behind Enhanced Games is fascinating. It's an idea that just doesn't sit right with me from both a moral and health standpoint but I'm curious to see how it plays out.

A good question posed was:

from a legal standpoint what if one of the athletes has health issues that stem from taking drugs later in life?

Moving On With Hobbies

I've been thinking a bit lately about my membership at Patterson River.

I love the game of golf. I love playing and trying to improve my handicap.

But being a member of a golf club is expensive. I currently pay $300 a month. I feel like I need to go all in on playing multiple times a week to get value out of it.

I feel a pull at the moment to have a bit more balance with my hobbies. I still want to play a bit of golf but I also want to focus a bit more on my physical and mental health.

What I'm thinking right now is cancelling my membership at Patterson River.

My new plan for golf is as follows:

This opens up some more time for me to:

  • Spend time with Emma
  • Try some group exercise classes
  • Go to dog club with Boots

I think overall this will be a positive step for me moving forward.

Carlton

A date night in Carlton is really enjoyable.

It may be some nostalgia but going to the Melbourne Museum is fun. The Star Wars Lego exhibition is a nice addition too.

We had dinner at Bistra which was delicious. Very small portions but the food was outstanding.

Roots Of Patcha Review

In the last week or so I've played a lot of Roots of Patcha. It's an excellent Stardew Valley clone.

Playing another similar game to Stardew has made me realise how much I enjoy this genre. The beautiful pixel graphics and just the general feeling of warmth is something I love. I find that playing the game really helps me unwind.

It also makes me think about how I'd love to make a game like this. Not necessarily a "farming simulator" but something with the same art style, fun music and some sort of goal to grind towards. I'd love to make a golf game with this art style. I have no idea mechanically how it would work but I just think it would be cool.

Maybe some kind of "golf course builder" where you're the greens keeper. I'm just spitballing ideas.

Tuesday, June 17, 2025

US Open Relief#instagram.com

This was a wild decision that really cost Sam Burns.

Sunday, June 15, 2025

Cairns Beach

Collingwood Pubs

I've been to a couple of Collingwood bars and pubs in the last few weeks that I think are excellent. We're blessed in Melbourne to have some of the best pubs in the world. It's just a shame none of them are anywhere near where I live on the south side. These are some of my favourites in no particular order:

  1. Marquis of Lorne
  2. The Park Hotel
  3. Retreat Hotel
  4. Bar Liberty

Saturday, June 14, 2025

Burnt Out

I felt a bit burnt out from playing Skyrim. The game was almost too big and overwhelming. I might come back to it eventually.

For now I might check out these 2 games:

They seem to be much more my speed.

Friday, June 13, 2025

The Enthusiast#theenthusiast.net

Really cool to see that Myke now has a blog. A lot of his taste and thoughts on technology I generally align to so I appreciate this being a thing.

Golf And Cricket At Its Best

Last night saw birdies (at the US Open) and runs (at the World Test Championship) hard to come by.

This is truely where these sports are at their best.

When a golf course or cricket pitch tests even the best players in their respective sports you're in for some entertainment.

I'm backing in Jon Rahm at the US Open.

Australia hopefully win from this position but a few more runs from Starc and Lyon tonight would be very helpful before they have to come out to bowl.

The Story Of Limpy Continues

Last weekend we headed up to Woodend again which was really nice.

Boot's limp had gotten better and we were confident he was on the mend.

He hardly ran in the paddock when he was at the farm anyway because it was so cold.

The day after we got back Boots had a bath and after the bath we noticed his other leg (his right) had now gotten very sore. He was really limping around and seemed like he was in a lot of pain.

We took him to the vet and had some bloods done. Unfortunately some of his markers from the blood test were a little higher than what they should be. The vet recommended that we get a joint tap done which essentially meant he'd need to be put to sleep and have some fluid taken from his joints. The fluid is now being analysed by a specialist so hopefully we know more soon!

The sad reality is that vet bills are not cheap. We're hoping we can get some of this covered by insurance.

Some happier content: here are some cute photos of him when he was limping around at the beach yesterday.

Thursday, June 12, 2025

Apple Containers#github.com

This is something in my world that's interesting from WWDC. I wonder if any GUIs will be built with this? I feel like this will be the best way to do containers on macOS.

Tuesday, June 10, 2025

Copilot#code.visualstudio.com

I probably should start using Copilot more efficiently with these shortcuts.

WWDC 2025#theenthusiast.net

However, the thing I’m most excited about right now is what they’re doing with iPadOS. The multitasking changes look fantastic for productivity on the system. Freely resizable and overlapping windows! We finally got it, and it already works pretty well. I am eager to see how this feels once settling into some real work, but I can already tell I’ll finally want to get a Magic Keyboard.

The window system looks nice.

Also, AUDIO IMPROVEMENTS??? For PODCASTERS???? I can’t believe after over a decade of asking, they actually did it. Later this year, it could genuinely be possible for me to record a podcast over Zoom and have a local recording to share for editing. I am thrilled this day has finally come. Maybe there is a future where I won’t need both my Mac and my iPad on a trip—I can actually just choose what feels right. I can’t wait to see what Federico ends up doing.

Woah this came out of nowhere. It's been a long time coming. I'm keen to check this out further.

I am also intrigued to learn more about how developers can leverage Apple Intelligence models and exactly what they can be used for. On the surface, this feels like a big win for the community.

If you can run models on device for free and they're good then this is a huge win for developers.

I also just noticed that they're supporting background tasks on iPad. This is again long overdue but this is incredible for podcasters and video people.

Big Week Of Sports

As my mate Oscar reminded me this is a huge week of late night sports for both the US (eastern) and British time zones.

The US Open is shaping up very nicely to be a cracker. It starts Thursday night / Friday morning on Kayo.

The World Test Championship kicks off this Wednesday night 7.30PM and will be on Amazon Prime.

Monday, June 9, 2025

Classic Stableford#instagram.com

This truely is a classic stableford result. A guy has shot a course record 56 and still not won the daily competition. What a farce.

Friday, June 6, 2025

Oakmont#youtube.com

This is going to be another beastly golf course for a major.

Whatever your thoughts on Bryson are; this is so cool to see a professional play a practise round and hear their thought processing going through each shot.