New vs Old

Once again, I think the title should be unpacked. During this post I shall explain my new setup for hosting my website and how it differs from the old model. This wont be that long of a post as I mostly just want to get to the point.

I suppose we should just jump right in! Currently my server is running on a single raspberry pi, with most subdomains being routed through nginx to a specific docker container to offer that service. I plan on purchasing the newest raspberry pi very soon as I want to start building a cluster using K8's, but this will most likely only happen later in the year (likely in December).

The biggest change from my previous setup was the fact that I didn't actually host the root of my website, which really was unfortunate as it meant updating the website was exceedingly tedious as I could not ssh into the remote machine (the previous host did not offer this...) and hence any changes would force me to use the web application in order to update my website. However! With my new setup this is no longer an issue as I can ssh to my pi when ever I need to, and have also setup sever crontabs to ensure that my domain will always point to my pi's public IP address.

One of the other issues with my previous setup was the fact that the ports where really going wild. The reason I say this is, since I did not use a reverse proxy I was force to encode the port into the url (i.e http://git.skiqqy.xyz was something like http://git.yggpi.co.za:8834) which needless to say was over complicated and could easily result in erroneous behavior.

As for the source code for my website, it is hosted on sourcehut, which is mirrored on my gitea instance. I have my pi pull master every 5 minutes (using a crontab) to ensure the website stays up to date. Another important feature I added was by writing a script which will automatically update my DNS records to point to my pi, hence ensuring maximal up time.

The awesome thing about everything mentioned in the previous paragraph is that, together they ensure that as long as my pi is powered and connected to the internet, then my website (and all services) should be up and running (provided I haven't manually disabled something).

~ Skiqqy