ppseafield

Build the Blog Image, Run, and Test

Setting up builds, using Forgejo as an image repository, and running a test.

Building the Image

Since I'll be running a server rendered Nuxt app elsewhere, let's build this as a node image, even though it's just static content.

Since our Forgejo instance can be used as a container repository, we can log into it with Buildah. Since we're logging into our localhost registry, we need --tls-verify=false.

There are two ways to build images with Buildah: using a Dockerfile, or using a shell script. I'm more familiar with Dockerfiles, so I choose that. I did learn that RUN --mount=... existed to cache dependencies between builds when there are no dependency changes.

Because better-sqlite3 requires post-install work I had to copy over pnpm-workspace.yaml as well. Took a minute to figure out, and it was the fist time I've looked at that file. Once our Dockerfile included that, the build was successful.

I popped out a simple compose file to test it, and it runs just fine.

Getting Forgejo Runner Going With Podman

I found a few helpful bloposts, which I followed. I had seen some systemd unit files, but today I learned about enable-linger, which lets user services keep running after a user logs out.