I previously posted about jtiong.dev – keeping my commit logs going and making things presentable for future collaborators and colleagues, as well as my own little bit of self promotion on the internet.
With my recent break in work and taking the time to both sharpen and upskill myself – I thought I’d bring this into the new future with the site pulling from my Github account instead of a now defunct GitLab installation.
In the current “1.0” version:
- Commits are automatically fed through via CURL request
- There’s no censorship for any potentially sensitive information
- There’s no authentication for management of commits/repos
- There’s no filtering you can do
- The date/commit times are inconsistent
Not to mention it’s GitLab powered and as I’m currently working through some property changes – I’m bouncing between two properties and the server hardware hosting GitLab is currently turned off.
Queue, my move to using Planetscale as my core DB service for my personal online stuff, and moving my code to Github where possible (because it’s where everyone else is).
For version 1.1 which upgrades this, I’d like to add:
- A system with Auth that lets me hide a repo, or a given commit hash for any potentially sensitive info from being revealed
- A filtering system by repo so you can see, per repo, the commits to that repository
- More accurate representation of the commits/date/timeline
Implementation Logic
Just a couple of loops to go through Repos → Commits is all I really need for my personal scale. Below is a very simplified diagram:
This’ll all be included into some cron tasks that run maybe hourly or so to avoid spamming GitHub.
It’s just simple little pleasurable busywork to be honest, but after about 6 months of not really touching any code and taking my time with stuff, it’s nice to get back into the groove!
I work on a lot of different coding projects from a personal perspective. Usually depending on mood, or other factors, I will jump from project to project, working on them whenever time permits. My most recent role in my career left me a little bit short of coding and development time; focusing instead more on project delivery, and team management to get a big product across the line at a FinTech startup.
So, to get my coding juices flowing once more, I thought I’d whip up some self-hosted work:
- Deploy and install GitLab to manage my code
- Build a site to track my activity to get back in the swing of things
Cue, https://jtiong.dev
What’s the purpose of this?
It is a simple quick overview of my activity on the code repositories that I’d ported over to my localized GitLab installation. It will let me see what I’ve been working on recently, and keep me motivated, on continuing to polish my skillsets.
What this project demonstrates
Well, this demonstrates several things I thought might be handy going forward:
- Deploying an NGINX Proxy (on an external machine), via Docker Compose to manage the incoming connections to jtiong.dev and other various websites
- Deploying GitLab Community Edition onto a different physical server for my personal use and code management
- Creating a Docker Compose deployment based off the
php7.4-apache
image for the site - Using my own framework Spark – to create this site
- Using a self written URL Router
- Using PSR-4 to autoload classes
- Interacting with the GitLab REST API
- Using Bootstrap 4.x for a very simple frontend
Source code to the site can be provided as needed to, although I really need to clean it up.
It’s been good getting back in the saddle for some basic web development again! 🙂
I’ve got several servers which I work on, and quite often, this involves running regular cron’d tasks that perform various backups and configuration updates for me at odd schedules (as an example, my Rust server wipes fortnightly, and needs a config update to change the server name to reflect the last date wiped).
To do things like this, I’ve usually just written a script in PHP and run that at a given interval (daily or otherwise). There’s no real reason I chose PHP to write these scripts aside from familiarity with the language, and no doubt the rest could be easily achieved be it through Python, Shell Script or any other language out there.
For now though, PHP serves my needs just fine.
The problem is, I don’t actually keep these scripts backed up anywhere, or organised in any sort of manner!
The age of GitLab
Over the last couple days, I’ve implemented GitLab into my homelab stack (JT-LAB), and will be using it to store most of my code as a “source of truth” and subsequently sync things to GitHub afterwards (depending on the projects of course).
To the Game Servers, Four Branches…
Based off the various server types; specific branches would be used. For now, these would be:
- Rust
- Minecraft
- Factorio
- Satisfactory
Each game would be represented in its own branch, and based off that branch, would deploy a specific set of commands as needed. For the most part, only Minecraft retains itself in persistence, and the rest rely either on a voted wipe, or scheduled wipe paradigm.
To the File Systems, Five Branches…
Then we have servers with actual file resources and assets that I’d like to keep; things like Photos, Design Assets, old code references, etc. These would be:
- Media
- Design
- Research
- Education
- Maintenance
And nine, nine branches were gifted to the Websites
I also run a number of websites for friends and family on a pro-sumer level. I won’t really list these projects, but they do total up to 9! So it all kind of fits the whole LOTR theme I was going for with these titles.
One Repo to Rule them all…
The decision to build everything into one repository to manage all the core backup operations means I have less to track; for a personal system, I think this is fine. Monolithic design probably isn’t the way to go for a much larger operation than mine though!
Announcing…
Cronjobs
So this is the hypothesized project I’d like to build over the next few days; in combination primarily with jtiong.dev which will help track the commits and such that I do. Writing these projects up here as project whitepapers on a more formal basis might help with some resume stuff going forward for my future career 🙂