Category: Possibly useful
-
Quick & Dirty auth with nginx & Node
One of the basic requirements for any serious web app is a proper users/roles/authentication system – but if you’re just throwing up a utility of some kind on a public IP for testing, and you don’t want it to be abused, then this could be an option. There’s a few components: I briefly discussed web…
-
CSS for React Components
If you think back to HTML as being a document with headings and paragraphs and other semantic bits, it made a lot of sense to have the styles (expressed as CSS) separate to the document. This allows us to change the styles without touching the document – perhaps the user wanted a dark theme, needed…
-
React – a To Do Example
Since I’m on a roll making different versions of the To Do app, this might be a good time to talk about React. React is one of the giants of front end libraries. It’s based on a few big ideas – and to work effectively in React you need to wrap your head around these.…
-
htmx – A To Do Example
HTMX is an interesting project to me, and I’ve used it a bit in my large collection of 70% completed side projects, but haven’t really discussed it here. The plan for this post is to talk briefly about what it is exactly, then convert a simple ‘conventional’ (HTML/CSS/Javascript) app to htmx and think about some…
-
Docker volume backup is more complicated than it should be
When I set up my first Docker container (I think for Uptime Kuma), I had read around and understood there were two choices for persistent; bind mounts (where the data inside the container is effectively a symlink to a location on the local file system) or name volumes where Docker abstracted that away a bit,…
-
Displaying markdown as HTML
In the spirit of over-complicating things, when I wanted to collect all the links to the services on my homelab into one place, I decided I needed to write them in markdown, and have them converted on the fly into HTML by a server. Then when I couldn’t find exactly what I was after (Harp…
-
Solved DNS Issues – Proxmox, LXC, Ubuntu, Tailscale
I’ve picked up an new TP-Link WAP with Omada, so I wanted to spin up an Ubuntu 20.04 LXC to run the controller software in, and ended up spending a couple of hours figuring out why things where not working. The initial problem was I was having connectivity issues pulling down the updates for all…
-
Ansible with Secrets
We wrote a nice little Ansible playbook the other day to install nginx on our web servers and ensure it was running. We were able to store the usernames in the hosts inventory file using the ansible_ssh_user variable. Then, we ran the playbook with the command: ansible-playbook web_installs.yaml –ask-become-pass This asked us the password to…
-
nginx in Front of a node.js app
NGINX is a great webserver and reverse proxy – as in it can hand off requests to other web-servers. That’s the situation I want to have set up on my VPS. I want NGINX to handle incoming requests – some of them will just be sorted out by returning static HTML, others (like the weather…