Joel Always one syllable, sometimes "@jayroh"

caddy, docker, and dnsimple

16 Nov 2024 #dev #homelab #self-hosting

“I’m experimenting wth Caddy as a replacement for Nginx.”

Right now, that’s an aspirational statement, and not entirely factual.

Because, I would need to get Caddy to run properly to actually experiment with it.

Alright, haha – enough sarcasm.


In order for me to get Caddy to run with the following requirement - must have a Caddy docker image that supports DNSimple’s TLS challenge. The stock Caddy docker image you get from Dockerhub does not have all of the DNS providers. As a result, you need to build your own image containing the DNSimple module. How might you do this?

Edit your Dockerfile.

FROM caddy:builder AS builder

# Set Go environment variables to fetch dependencies directly
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.io
ENV GOSUMDB=off

RUN xcaddy build --with github.com/caddy-dns/dnsimple

FROM caddy:latest

COPY --from=builder /usr/bin/caddy /usr/bin/caddy

When I attempted to build an image with the above, not containing the ENV’s I would run into errors related to the proxies used to fetch the Go libraries. The ENV’s above were helpful to get things to work, thanks to the comments here in a Github issue.

Built with:

docker build -t caddy-with-dnsimple .

Bonus compose.yml contents:

services:
  caddy:
    image: caddy-with-dnsimple
    container_name: caddy
    hostname: caddy
    restart: always
    volumes:
      - ./data/caddy:/data
      - ./data/caddy/Caddyfile:/etc/caddy/Caddyfile
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 80:80
      - 443:443

And started with docker compose up -d

Fujifilm x100vi Part 2: Buttons, knobs, and dials

13 Oct 2024

So much stuff in this thing. What are all the buttons and knobs? What are they called? What can you do with them?

At the top of the camera

Function 1 button to the right of the On/Off switch. (The un-labeled one.) It turns face detection on and off.

The exposure compensation dial is right next to it. This is for when you want to over-expose or under-expose your photos.

The big dial towards the center is the shutter speed, and ISO dial. More on this soon … because I admit that I have a lot to learn.

The “hot shoe” is where you can place your external flash (The light. Not the memory.)

At the front of the camera

  • Front command dial.
  • The “function two” button which brings up a menu that allows you to loop through common settings with the control ring while you are shooting. Eg: cycling through different “film simulations” you can choose (sepia, black and white, etc).

    An example of the utility of “function two” is providing fast access to “tele-conv” (or “teleconverter”). To go from “off” to 70mm or 50mm:

    1. Press function two on the front of the camera
    2. Cycle through the options to “tele-conv”
    3. Now when you’re ready to shoot, turn the control ring to zoom in with 50mm to 70mm modes.
  • Around the function two button is a little toggle where you can switch between your optical viewfinder and your electrical viewfinder.
  • Between the control ring and the body is the aperture ring.
  • At the very front is where you can attach filters by unscrewing the very tip, or front of the lense, and placing your filter attachment and filter. Like the Moment Cinebloom filter, as mentioned in the video.

To the left of the camera

The focus mode switch where you can select “manual focus”, which turns your control ring on to focus your shot, well … manually. Clicking on the dial in the back of the camera, at the top and on the right, to zoom in.

“Continuous” is great for when you’re shooting moving objects.

“Single” is better for shooting things like portraits.

The back of the camera

The viewfinder and the diopter immediately to the left where you can adjust the focus of the viewfinder. Immediately to the right is the sensor that will turn the screen off if you’re placing your eye up to the viewfinder.

The “Drive/Delete” button which will display the menu to switch between different shooting modes - most common for selecting whether you’re in “Still Image” or “Movie” modes.

“AEL / AFL” button, is the exposure and focus lock button.

The rear command dial to the furthest right at the top controls the shutter speed.

The little “Q” button on the edge of the back, on the right side, is the “quick menu button”. This gives you quick access to different settings so you don’t have to dig through all the different deep menu settings. You use the little joystick to move around to the different quick menu items and then cycle through each of them with the rear command dial.

Fujifilm x100vi Part 1: Introduction

12 Oct 2024

Fujifilm X100VI camera sitting on my window ledge, backlit by muted sunlight
Photo of the Fujifilm X100VI camera, taken with a (clearly inferior) iPhone 14 camera

I bought a new camera.

Earlier in the year there were a glut of videos on social media about this new Fujifilm X100VI camera that people were freaking out about. I fell down into the rabbit hole, read many reviews, and watched my fair share of videos. Having walked around a little bit with a Nikon DSLR many years ago, something about the size of this little camera paired with the features struck a chord. At that time I thought, “I must have this”. The issue upon completing said thought was that this camera, unless you pre-ordered at the moment of its announcement, would remain on back-order for months.

Undeterred, I placed my order. And I waited.

That was 7 months ago.

Last weekend it came in.

Ok. How do I use this thing?

Because, the answer to which, is - I haven’t the foggiest.

Buttons, knobs, dials, switches, gestures. Derp?

I guess I’ll have to figure it out the same way everyone else figures anything out - by watching YouTube videos. Oh - and for me - by taking notes. So, here’s where I’ll be posting some associated YouTube videos, along with anything I find noteworthy enough (for me) for future recall. If you find this helpful, that’s great. If not, that’s also great.


Stills or Video

Changing the context of how you’re shooting. Always change the settings for still shots by turning the camera on, pressing Drive/Delete and scrolling and selecting “Still Image”, versus scrolling all the way down to the bottom and selecting “Movie”.

You are able to change video settings while still in “Still Image” mode, but there are different options and settings within the “still image” context that you can change or further update in the “Movie” context.

As a result, always change the settings for either where it is best applied.

Still Images: Miscellaneous Settings

When going through all of the configuration options, there are some things I found to be unintuitive. For example:

  1. Under “AF/MF” (Auto-focus / Manual Focus) there are some things that will be grayed out, or unable to be changed. This may be depending on the focus mode setting on the left side of the camera body - “M, C, S”. You will have some things available if you are in “Manual”, or “Continuous”, or “Single” focus modes.
  2. “AF+MF” - when turned on, will auto-focus first, then allow you to manually focus after the auto-focus is done.
  3. “MF Assist”, set it to “peak”, with “focus peak highlight” set to “RED(HIGH)”. This will highlight the areas of the subject in focus within the lcd with red, well, highlight. When using the manual focus dial this will provide you a better idea of what is being focused on.

Videos: Miscellaneous Settings

  1. “Movie Settings” / “IS Mode Boost”: Good to turn this “On” if you are shooting video, and holding the camera still in your hands. If you don’t have a tripod and it is being held perfectly still, turn this setting on.

Items for Future Research

  • Film Simulation - the different “looks” and styles you can choose, when you’re shooting
  • Auto-focus settings and usage
  • Shortcuts

play with minio

06 Oct 2024

To say that I’m interested in or curious about object storage in the cloud is an understatement. I work on an app in my spare time that acts as an abstraction layer on top of Amazon S3 (Shubox - go check it out). So, yes, I enjoy looking into anything and everything in that space.

Something that’s been on my radar for a long while now, are the self-hosted S3 clones that have popped up over the last several years. The bigger one of them would have to be Minio. They’ve been around for about 10 years now and have grown themselves into a proper enterprise software solution. Good for them. Being the “on-prem S3 company” is nothing to scoff at.

But I am not of that scale. I am of the … hobbyiest at home … scale. I wouldn’t even register on a scale. Anywho …

The point here, is - you could host an “S3-LIKE” on your home machine(s) and play with it however you like. I’m currently playing with it as an object store for screenshots and images. And so far, so good.


So, how do you run it? Docker’s probably the easiest way.

mkdir -p /tmp/data

docker run \
   -p 9000:9000 \
   -p 9001:9001 \
   --name minio \
   -v /tmp/data:/data \
   -e "MINIO_ROOT_USER=admin" \
   -e "MINIO_ROOT_PASSWORD=password" \
   quay.io/minio/minio server /data --console-address ":9001"

Translation:

  1. Run the minio docker image as a container
  2. Binding ports 9000 and 9001 to your host machine
  3. Where 9001 is the console / “web admin” port, and 9000 is the REST api port
  4. The username and password are admin and password
  5. And the container’s /data directory is mounted in /tmp/data on your machine.

This will get it up and running. You can visit http://localhost:9001 and log into the console with said username and password.

That’s the easiest way to play with it - create buckets, upload files, etc.


Awesome. Now what about working with it from a client machine, with their mc “minio client” utility?

# Let's assume you're on a mac with homebrew
brew install minio-mc

# alias "minio" in the `mc` config to your localhost REST api port, with that username and password
mc alias set minio http://localhost:9000 admin password

# show information about the running instance
mc admin info minio

# make a bucket called `berkit`
mc mb minio/berkit

# copy a file into `berkit`
mc cp photo.jpg minio/berkit

# list files in `berkit`
mc ls minio/berkit

Pretty straightforward. There isn’t much you can’t figure out by running mc --help.


What else? You can use regular S3 clients, like s3cmd from s3tools.

Create a file in ~/.s3cfg with the following:

# Setup endpoint
host_base = localhost:9000
host_bucket = localhost:9000
bucket_location = us-east-1
use_https = False

# Setup access keys
access_key =  admin
secret_key = password

# Enable S3 v4 signature APIs
signature_v2 = False

Which you can use like it was regular old AWS S3!

s3cmd ls s3://berkit
s3cmd put index.html s3://berkit

Of course there’s more, but that will give you a sense of how easy it is to tinker with it and see what’s available. If you’d like to look a little further into it, I recommend the “MinIO for Developers” YouTube playlist. There’s quite a bit there.

One thing I’ll mention before closing this out - testing with your favorite FTP, or S3 object storage client. Something like Transmit from Panic. I spent a good bit of time banging my head against the wall trying to get Transmit to connect to my instance of MinIO. Turns out, Transmit will not connect to an “S3-Like” unless it’s got an SSL cert in front of it. There’s no way to tell it to not care (like you can in s3cmd or the native mc client). Once I put port [ip address]:9000 behind a LetsEncrypt cert with a hostname, I was able to point Transmit at it, and it worked out A-OK.

2023 year end review

31 Dec 2023

The sun sets beyond Beacon St. - Washington Sq, Brookline. The sky is a bright orange where it meets the horizon
One of the more beautiful sunsets in our neighborhood this year, which seems fitting, as the sun now sets on another year. Farewell 2023.

Well, it’s about that time. We are careening to the end of another year, and in addition to the natural impulse to reflect whilst relaxing during the quietest time of the work year, everyone is also publishing their “year in review” blog posts. With how much I enjoy reading these posts from people that are, to be quite honest, perfect strangers - I figure I should contribute, do the same, and give folks a peek into what 2023 looked like for me.

Health

I started the year with no resolutions. No concrete goals. The best I could (would?) do was commit to doing the most, and the best, that I could to keep me and my family healthy. In March, on my birthday, I saw my primary physician for the first time since before the pandemic. From that visit came: full blood work, scheduling the colonoscopy (I am of that age), several visits with a psychiatrist, some therapy (which everyone, I posit, could use more of). Additionally, in March I kicked off working with Form Health as a patient/customer.

The good:

After 20+ years of neglecting a previous diagnosis of attention deficit disorder (no “hyperactive”) I got back on proper medication and was able to operate as – what I imagine to be – a normal human being. Something about writing code for most of my career worked with and through my “quirks”, but the switch to management, all of its meetings, and high-interrupt requirements, did not pair well with the parts of my brain that are off. The lesson here: do the research, recognize the patterns, and don’t make the mistake of considering proper medication a moral failure.

Last winter saw my activity take a dip, and some weight I’d previously lost, was found! The decision to double down on weight-lifting and engaging with Form Health righted the ship. I’m down my lowest number since the turn of the decade, which I’m pleased with. On a similar note to the one above, proper medication contributed to my being able to live a more “normal” human life. I will write more about this in the future as it deserves its own post.

It's me. In a gym. Taking a selfie.
This will be the first (and probably last) time I will ever put a selfie of myself out there, flexing. So, enjoy.

The bad:

For most of the year we battled through a cancer scare in our family. (I won’t get into specifics as some things deserve the privacy 🙂.) I won’t bury the lede, but everyone is ok and we are on the other side of the worst of it. Several procedures and many trips to the doctor have put us in a place where the risk is approaching zero. We’re not there yet, but almost. Needless to say the ordeal was … a lot. As a result I ended up taking some time away from work when everything just got to be too much. I am grateful to work somewhere that views their employees as people with lives both rich and complicated and sometimes rocky, bumpy, overwhelming.

(Of course) our dogs are a large part of our family. In the spring we lost Pearl. She was 12 and had lived a long and wonderful life. To this day we miss her terribly.

This past month my last 2 wisdom teeth were finally pulled. Folks. Do it all when you’re a young’n. Get them ALL pulled. Don’t weight until you’re in your 40’s. Trust me when I say it’s a bad bad bad bad idea to wait.

The last photo I have of Pearl.
R.I.P. Pearlie. We miss you today, and always.

Work

The 4th anniversary at my day job came and went. This was a huge milestone for me as, historically, I tend to get a little antsy every few years. The challenges and opportunities never failed to keep me engaged, and I consider the people I work with on a day-to-day basis high character, high intellect, and highly empathetic human beings. If the “tech” world doesn’t make you ill then consider this an endorsement. We welcomed our first cohort of interns since the pandemic began and looking back on this year, consider that experience to be one of the most rewarding parts. (Shout out to Manuela and Tilon! And shout out to Hack.Diversity - an absolutely first-class org!)

On the Shubox front, I made the pivot from “bring your own bucket” to “buy a bucket w/Shubox” and finally turned the feature flag to 100%. I continue to work on it, but admit that, with some hindsight, I would have done some things very differently when I first started out. This coming year will be my put-up-or-shut-up year. Who knows how things will look in December of 2024.

Group photo in Post Office Square (Boston).
Group photo of our team back in July during our Summer Sweetness week.

Fun

  • Made it to Terrificon and met some childhood heroes. Will absolutely do it again in ‘24. (Jim Lee?!? OKAY!)
  • Took G to several Boston Celtics games. Some W’s. Most L’s. But that’s okay because each experience was a blast.
  • Watched G perform in a breakdance recital, and his first after-school play. He’s a born showman, this kid.
  • Set up my home office, permanently, as a combo standing and treadmill desk. My 13 year old Herman Miller Aeron chair now belongs to a new home, thanks to CraigsList.
  • Welcomed a new family member, our 4th English Bulldog - Ruth, or Ruthie, or “Rudabega”, or “Luda-Bega”, or “Ru-Ru Cakes”. There is still an abundance of puppy energy but she’s as sweet as she is crazy.
  • Met friends at as many Treehouse brewery locations as possible. I miss my friends. I talk to many of them every day, but I miss them.
  • Bought too many comic books. “Too many”.
  • Saw Botch, Converge, and Cave In at the Roadrunner as part of Botch’s reunion tour. Another bucket-list band ✅.
  • Saw several movies. Standouts:
    • Across the Spider-Verse
    • Oppenheimer
    • The Killer
    • The Holdovers
    • American Fiction
G flexing in his JB jersey, at the Celtics game
💪 CELTICS! 🍀 💪

Conclusion

It wasn’t the greatest year. It was also not the worst. As with many things, the key to sanity is not allowing yourself to get too high, or too low. I look back on the last 365 with many things I can smile at, and as a result I consider myself extremely fortunate, privileged, and grateful. Let’s hope that 2024 brings us more adventures, more laughs, and more triumphs.