I broke my homelab repo into a remote directory for services on my VPS and and a home directory which will be implemented on a server on my local network. As a test for the home server, I added an instance of orb running in a docker container. It's a pretty neat wifi metrics application that can give information about a network.
Today (and yesterday) I learned about webhooks! Instead of needing to poll a service to check for updates using an API, a webhook requires the service to send information to a set endpoint. For example, the repository for my GitHub Pages site is configured to send a POST request every time someone pushes to the repo. To receive the POST request, I used Hookdeck, a service that hosts a public endpoint for a webhook and can relay the information to a machine locally. I also built a flask app hosted locally on my VPS that receives the information from Hookdeck and executes a script to rebuild and restart the docker containers running the site.
A summary of my current hosting setup. I'd like to automate the update process with a webhook and in the future use K8s and a GitOps tool:
DockerServices/
├── portfolio/
│ └── Mika-Chang.github.io/
├── compose.yaml
├── update-containers.sh
└── ...
I use this bash script:
#!/usr/bin/bash
cd portfolio/Mika-Chang.github.io
git pull
cd ../..
docker compose build
docker compose up -d
Huge wins today! I implemented a conditional svelte adapter using a blog post by Ryan Filler. He's written some really cool stuff. In one blog post, he tried to calculate the C02 emissions of his blog and then took steps to reduce the emissions which was awesome. It's sometimes easy to forget how much the use of the cloud can affect the environment (a lot).
Once the adapter was implemented I dove into Github Actions. I was able to set up a workflow to test the website build when changed in multiple branches and updated the deployment workflow to use the correct adapter! Next, I'd like to automatically deploy to my github pages site and my personal website (mikacc.xyz).
Today I read Show Your Work by Austin Kleon (https://austinkleon.com) after the book was recommended by in a video by Mischa van den Burg. I couldn't put it down! I've struggled to be vulnerable enough to show my process, but I think doing so would help me, and hopefully other people in my shoes. These were the takeaways that really stuck with me.