Self-hosting Blog entry (and some css)
This commit is contained in:
parent
5832c3f492
commit
ce35a86600
@ -6,7 +6,7 @@ tags:
|
||||
---
|
||||
First blog post in a long time. This was caused by combination of four things (most of which I hope to address in more detail in following blog posts):
|
||||
* My home network starting misbehaving and I was focused more on fixing that than blogging (the first rule of homelabbing - whatever you mess with with, your living partners need to be able to access the Internet, and to work the lights and heating!
|
||||
* I finally took the plunge in moving this blog from fully AWS-hosted to self-hosted.
|
||||
* I finally took the plunge in moving this blog from fully AWS-hosted to self-hosted (EDIT: blog post [here]({{< ref "/posts/self-hosting-blog" >}})).
|
||||
* I got Laser Eye Surgery and was recovering from that (probably won't be blogging about that, not much more to say!).
|
||||
* I started writing a post to articulate my confusions or uncertainties about web3, with the intention of understanding it better.
|
||||
<!--more-->
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: "My First Post"
|
||||
date: 2021-12-04T11:21:26-08:00
|
||||
tags:
|
||||
- metaBlogging
|
||||
- meta
|
||||
---
|
||||
In true navel-gazey meta style, the first post on this blog is a description of how I set up the blog.
|
||||
<!--more-->
|
||||
|
22
blog/content/posts/self-hosting-blog.md
Normal file
22
blog/content/posts/self-hosting-blog.md
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
title: "Self Hosting Blog"
|
||||
date: 2022-05-02T19:01:33-07:00
|
||||
tags:
|
||||
- meta
|
||||
- homelab
|
||||
---
|
||||
Despite this blog being [initially set up to primarily talk about self-hosting]({{< ref "/posts/my-first-post." >}}), I'd actually been hosting it on AWS until very recently. This was due to caution - I know just enough about security to know that I know next-to-nothing about security, and so I didn't want to expose any ports on my _own_ network to the Internet. Instead, I set up [an AWS CodePipeline](https://github.com/scubbo/blogCDN) to build the blog and deploy to S3 anytime I pushed a new change. Admittedly, this was a pretty cool project in itself that taught me a lot more about CDK and some AWS services; but it didn't feel like true self-hosting, even though I wasn't using anything like Medium or WordPress.
|
||||
<!--more-->
|
||||
Thanks to [this great blog post](https://eevans.co/blog/garage/), I found an alternative that allowed me to feel the nerd-pride of self-hosting while retaining security. [Cloudflare](https://www.cloudflare.com/) offer a free service called "_Cloudflare Tunnel_" (formerly "_Cloudflare Argo_"). To quote that blog:
|
||||
|
||||
> This approach solves a lot of problems at once: there’s no need to open up any inbound firewall ports (hooray!); I don’t need to set up dynamic DNS records for my home IP address (which would, among other things, have some bad privacy implications); and I get Cloudflare’s DDoS protection and CDN features (which I would have wanted anyways for the blog). And crazily enough, it’s all free!
|
||||
|
||||
My setup's a little different than that author's (for one thing, I'm not running k8s...yet...), but the approach still works just fine. I built:
|
||||
* a [script that runs as part of my primary homelab Pi setup](https://github.com/scubbo/pi-tools/blob/main/scripts-on-pi/3_cloudflare_tunnel.sh) which creates the tunnel (from `blog.scubbo.org` to a port on the local machine)
|
||||
* a [script that's part of the blog content repo](https://github.com/scubbo/blogContent/blob/main/deployBlog.sh) which will pick up any new content, rebuild, and host on that same port.
|
||||
|
||||
I do admire the elegance of my previous setup (and of the setup I'm copying) whereby a push to the repo will trigger the build-and-republish - but, since I haven't taken the plunge to self-host [Gitea](https://gitea.io/en-us/) yet[^1], that will have to wait. I suppose I _could_ set up a local server (to trigger rebuild) which is called by a GitHub action after pushing, but that seems like throwaway work for nothing.
|
||||
|
||||
I also don't have quite the same level of paranoia as the author about network rules. That said, I did just install an OPNSense router (to replace the ISP-provided router that kept dropping my Raspberries Pi after a few days of uptime), so learning more about VLANs and Route Tables could well be in my future, too.
|
||||
|
||||
[^1]: and probably never will until I have [Backblaze](https://www.backblaze.com/) or some other reliable backup system setup - I trust GitHub's durability more than my own, and losing my code would be game over!
|
@ -1,4 +1,5 @@
|
||||
<!-- https://stackoverflow.com/a/70385342/1040915 -->
|
||||
<script src="/js/custom.js" defer></script>
|
||||
<link rel="stylesheet" href="/css/custom.css">
|
||||
<!-- https://mertbakir.gitlab.io/hugo/math-typesetting-in-hugo/ -->
|
||||
{{ if .Params.math }}{{ partial "helpers/katex.html" . }}{{ end }}
|
||||
|
4
blog/static/css/custom.css
Normal file
4
blog/static/css/custom.css
Normal file
@ -0,0 +1,4 @@
|
||||
blockquote {
|
||||
border-left: 5px solid grey;
|
||||
padding-left: 10px;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user