Commit Graph
81 Commits
Author SHA1 Message Date
ahmza 30ef38b143 Add HTTP-only Caddyfile for Cloudflare-fronted deployment
The live Caddy was returning a blank page (NOP, status 0) because its
site block had no responder \u2014 no reverse_proxy to the blog. This adds a
known-good HTTP-only Caddyfile matching the actual topology
(Cloudflare terminates TLS -> Caddy :80 -> SWS blog:80):

- reverse_proxy blog:80  (the missing responder that caused the blank page)
- encode zstd gzip        (fixes: origin was serving everything uncompressed)
- security headers        (fixes: HSTS/X-Frame-Options/etc were absent)
- trusted_proxies + client_ip_headers for correct Cloudflare visitor IPs
- http:// scheme so Caddy does not try to provision TLS (Cloudflare does)

Validated + fmt-clean against the caddy-cf image; tested end-to-end
locally (Caddy -> SWS) returning HTTP 200 with gzip and headers.
2026-07-25 04:19:34 +01:00
ahmza b7145e1323 Remove temporary Netbird connectivity debug step
Build Hugo / build (push) Successful in 1m32s
Build Hugo / deploy (push) Successful in 39s
The deploy pipeline works end-to-end now (Gimli deploys successfully),
so the diagnostic step used to trace the WireGuard/TUN issue is no
longer needed. RPIC continue-on-error is kept until the cluster returns.
2026-07-25 03:07:00 +01:00
ahmza 87867b9f30 Point compose.yml at Gitea registry image with :latest tag
Build Hugo / build (push) Successful in 1m27s
Build Hugo / deploy (push) Successful in 40s
CI pushes to tea.ahmza.com/ahmza/blog-ahmza-com, not ghcr.io, and a
bare reference could resolve to the non-runnable :buildcache tag. Pin
the image to tea.ahmza.com/ahmza/blog-ahmza-com:latest so docker compose
pulls the actual runnable image.
2026-07-25 03:02:39 +01:00
ahmza 8a7833e8f5 Make RPIC deploy non-blocking while cluster is out of service
Build Hugo / build (push) Successful in 1m26s
Build Hugo / deploy (push) Failing after 38s
The Raspberry Pi cluster is temporarily out of service. Mark its deploy
step continue-on-error so its failure no longer skips the Gimli deploy
or fails the whole job. Revert once the cluster is back online.
2026-07-25 02:42:15 +01:00
ahmza 4426668518 Use registry build cache instead of gha cache
Build Hugo / build (push) Successful in 3m23s
Build Hugo / deploy (push) Failing after 39s
The GitHub-hosted 'gha' cache backend is unreachable from the
self-hosted Gitea runner (dial tcp 172.18.0.2:44181 i/o timeout), which
failed the build step even though the image pushed successfully. Switch
cache-from/cache-to to a registry-backed cache stored as a :buildcache
tag in the same Gitea registry, which works on self-hosted runners.
2026-07-25 02:21:38 +01:00
ahmza eacf71d676 Debug: check runner WireGuard capability instead of UDP ports
Build Hugo / build (push) Failing after 13m45s
Build Hugo / deploy (push) Skipped
Other Netbird peers connect fine, so the server and 51820/udp are OK --
the hang is specific to the Gitea runner. Replace the UDP port probes
with runner-side checks: /dev/net/tun presence, effective capabilities
(NET_ADMIN), WireGuard tooling/module, and a definitive 'ip tuntap add'
test. A runner container lacking TUN/NET_ADMIN cannot create the
WireGuard interface, which explains 'netbird up' timing out after the
control plane connects.
2026-07-25 01:53:09 +01:00
ahmza b05814980f Update Netbird debug to probe correct data-plane ports
Build Hugo / build (push) Successful in 1m47s
Build Hugo / deploy (push) Failing after 1m15s
The Netbird server multiplexes management + signal + dashboard behind
Traefik on :443 (no separate :10000 signal port). The tunnel data plane
is WireGuard on 51820/udp and STUN on 3478/udp. Update the debug step to
probe those UDP ports plus a general outbound-UDP check (public STUN) to
determine whether the runner network blocks UDP egress -- the likely
cause of 'netbird up' timing out after the control plane connects fine.
2026-07-25 01:46:28 +01:00
ahmza eb67d6361e Add Netbird connectivity debug step to deploy job
Build Hugo / build (push) Successful in 1m44s
Build Hugo / deploy (push) Failing after 1m8s
Temporary diagnostic step before 'Netbird Connect' that checks secret
presence (masked), DNS resolution, HTTPS reachability to the management
API, and the signal server TCP port from the runner. Helps distinguish
DNS/connectivity issues from auth/registration failures behind the
recurring 'netbird up' DeadlineExceeded error. Marked continue-on-error
so it never blocks the build.
2026-07-25 01:39:09 +01:00
ahmza 8062b9d208 Read Netbird management URL from secret
Build Hugo / build (push) Successful in 1m46s
Build Hugo / deploy (push) Failing after 58s
Switch the deploy job's Netbird Connect step to read management-url from
the NETBIRD_URL secret instead of a hardcoded value, so the URL can be
managed in the Gitea UI alongside the setup key.
2026-07-25 01:33:47 +01:00
ahmza aa01def998 Merge pull request 'Optimizations: switch to static-web-server + Caddy reverse proxy docs' (#1) from optimizations into main
Build Hugo / build (push) Successful in 1m51s
Build Hugo / deploy (push) Failing after 57s
Reviewed-on: #1
2026-07-25 00:19:53 +00:00
ahmza f23fe01f3c Fix GitLab/Gitea inconsistency in README
Build Hugo / deploy (push) Canceled after 0s
Build Hugo / build (push) Canceled after 48s
Update the README to reflect the actual infrastructure: CI/CD runs on
Gitea Actions (not GitLab), images live in the Gitea container registry,
and the clone URL points to tea.ahmza.com. Also clarify the Blowfish
theme is a Hugo module, so no submodules are needed.
2026-07-25 01:19:29 +01:00
ahmza 1ad79d40d8 Use caddy-cf image with Cloudflare DNS-01 challenge
Switch the Caddy doc to the custom caddy-cf image
(ghcr.io/ahmzaa/caddy-cf) which bundles the Cloudflare DNS module, so
TLS certs are issued via the ACME DNS-01 challenge instead of HTTP-01.
This removes the need to expose ports 80/443 to the public internet,
which suits the Netbird-only infrastructure.

- Add (cloudflare) snippet + import cloudflare to both Caddyfiles
- Read CF_API_TOKEN from env (.env for Docker, Secret for K8s)
- Document token scope (Zone:DNS:Edit) and Cloudflare-hosted DNS
  requirement
- Validated Caddyfile against the caddy-cf image (caddy adapt)
2026-07-25 01:17:35 +01:00
ahmza 7d4f1668a6 Add Caddy reverse proxy documentation
Document running Caddy in front of the SWS origin for both deployment
targets (Docker Compose on Gimli and the Kubernetes Pi cluster), with
Caddy handling automatic HTTPS, compression, and security headers.

Explains the layer separation: SWS serves static files + Cache-Control,
Caddy owns TLS/compression/security headers (matching sws.toml where
those are disabled). Caddyfile validated with 'caddy validate'.
2026-07-25 01:13:10 +01:00
ahmza 498231c160 Tune SWS config for running behind a reverse proxy
The site sits behind a reverse proxy that already handles compression
and security headers. Disable those in SWS to avoid redundant work and
duplicate/conflicting headers, letting each layer own one concern.

- compression / compression-static: off (proxy compresses)
- security-headers: off (proxy sets them)
- cache-control-headers, page-fallback, health: kept (origin concerns)
2026-07-25 01:09:42 +01:00
ahmza 898e3003a2 Switch static server from nginx to static-web-server
Replace nginx:alpine-slim with the scratch-based static-web-server
image, reducing the final image size ~32MB -> ~23MB (28% smaller).

- Dockerfile: serve from static-web-server:2, copy site to /public
- sws.toml: mirror previous nginx behavior (compression, cache-control,
  SPA index fallback) plus security headers and /health endpoint
- Remove now-unused nginx.conf
2026-07-25 01:04:17 +01:00
ahmza 0d425c0ed1 Update .github/workflows/build-docker-images.yml
Build Hugo / build (push) Failing after 18m24s
Build Hugo / deploy (push) Has been cancelled
2026-03-06 01:31:33 +00:00
ahmza cd6f85f903 Update .github/workflows/build-docker-images.yml
Build Hugo / build (push) Successful in 52s
Build Hugo / deploy (push) Failing after 1m14s
2026-03-06 00:58:29 +00:00
ahmza 0bef6a1907 Update .github/workflows/build-docker-images.yml
Build Hugo / build (push) Successful in 52s
Build Hugo / deploy (push) Failing after 56s
2026-03-06 00:52:33 +00:00
ahmza 83ca9b61b8 Update .github/workflows/build-docker-images.yml
Build Hugo / build (push) Successful in 54s
Build Hugo / deploy-to-gimli-blog (push) Has been cancelled
Build Hugo / deploy-to-rpic (push) Has been cancelled
2026-03-06 00:39:57 +00:00
ahmza e9bcafb64b Update Dockerfile
Build Hugo / build (push) Failing after 47s
Build Hugo / deploy-to-rpic (push) Has been skipped
Build Hugo / deploy-to-gimli-blog (push) Has been skipped
2026-03-06 00:36:04 +00:00
ahmza 2480790384 Update .github/workflows/build-docker-images.yml
Build Hugo / build (push) Failing after 37s
Build Hugo / deploy-to-rpic (push) Has been skipped
Build Hugo / deploy-to-gimli-blog (push) Has been skipped
2026-03-06 00:30:19 +00:00
ahmza 22d3759756 Update .github/workflows/build-docker-images.yml
Build Hugo / build (push) Failing after 8s
Build Hugo / deploy-to-rpic (push) Has been skipped
Build Hugo / deploy-to-gimli-blog (push) Has been skipped
2026-03-06 00:26:33 +00:00
ahmza 9a6555f1c3 Update .github/workflows/build-docker-images.yml
Build Hugo / build (push) Failing after 9s
Build Hugo / deploy-to-rpic (push) Has been skipped
Build Hugo / deploy-to-gimli-blog (push) Has been skipped
2026-03-06 00:24:26 +00:00
ahmza d71dc7a86b modified registry auth 2026-03-06 00:23:39 +00:00
ahmza da5d05404f whoknows
Build Hugo / build (push) Failing after 1m20s
Build Hugo / deploy-to-rpic (push) Has been skipped
Build Hugo / deploy-to-gimli-blog (push) Has been skipped
2026-02-15 23:42:18 +00:00
ahmza 3322229b97 Updated hardening-linux post 2026-02-15 23:41:22 +00:00
ahmza 1ccf4d3d72 added deployment to gimli 2026-02-12 23:14:20 +00:00
ahmza a433830d1d Remove DOCKER_BUILDKIT setting in workflow
Remove unnecessary environment variable setting for Docker Buildx.
2026-02-12 23:00:44 +00:00
ahmza 36dae5fdf7 added github actions cache 2026-02-12 22:58:17 +00:00
ahmza ba646f28f1 Update ssh-action version in workflow file 2026-02-12 22:51:22 +00:00
ahmza d0f304ef95 Update ssh-action version in deployment workflow 2026-02-12 22:43:50 +00:00
ahmza 311627d9c8 added deployment to gimli 2026-02-12 22:40:32 +00:00
ahmza 6d8f616bf0 added deployment to gimli 2026-02-12 22:39:40 +00:00
ahmza 4fb2156fa9 added image creation for linux/amd64 2026-02-12 22:01:27 +00:00
ahmza 12e43ef580 Update kubectl rollout command for blog deployment 2026-02-11 23:42:47 +00:00
ahmza e9d8e0fdf6 updated action to use netbird for deployment 2026-02-11 23:20:54 +00:00
ahmza e11a1adeb4 added mastodon verification 2026-02-11 22:17:31 +00:00
ahmza cd493aa6d9 Merge pull request #3 from ahmzaa/my-hugo-workflow-post
new post
2025-06-13 11:46:46 +01:00
ahmza ca83ea1081 Merge pull request #2 from ahmzaa/hardening-linux
erm, just some writing :D
2025-06-13 11:45:59 +01:00
ahmza 6cf5869dcc merge back to main 2025-06-13 11:34:00 +01:00
ahmza 288c6c0d18 erm, just some writing :D 2025-06-13 11:05:18 +01:00
ahmza cc8e11ca01 moved back to ssh key as it was giving auth error 2025-06-06 00:59:23 +01:00
ahmza 4385ec04f0 ing tailscale ssh instead of keys 2025-06-06 00:37:27 +01:00
ahmza e57acb2fc5 changed ver of drone-ssh 2025-06-06 00:18:46 +01:00
ahmza ae8b7a7439 changed the tailscale version in the gh action 2025-06-06 00:00:47 +01:00
ahmza 526f36669f Adding a new post about Hardening Linux Systems and SSH 2025-06-06 00:00:18 +01:00
ahmza 4203f21813 who knows 2025-06-05 23:57:27 +01:00
ahmza f847d71f35 added arrstack post 2025-05-10 14:16:33 +01:00
ahmza e4fe59c622 updated blog archetype 2025-05-09 23:36:11 +01:00
ahmza f124fa0524 updated the go dependencies 2025-05-09 23:29:04 +01:00
ahmza 098ca167cc increased compression level, modified gzip response compression 2025-03-11 07:40:57 +00:00
ahmza eaedda36c5 ls was for development, no longer needed 2025-03-11 07:39:18 +00:00
ahmza 1622b0ac03 disabled unsafe rendering until needed 2025-03-11 07:34:43 +00:00
ahmza d330b229a3 further optimised hugo.toml and fixed error with image quality 2025-03-11 07:31:15 +00:00
ahmza 7a3cd39162 Optimised some text in posts 2025-03-11 07:28:18 +00:00
ahmza 60fa3602dd Enabled image resampling 2025-03-11 07:20:40 +00:00
ahmza ffca86b564 updated content 2025-03-11 07:16:59 +00:00
ahmza 03e29f1252 removed unnessecary tag 2025-02-13 12:59:43 +00:00
ahmza f3a49c8b3c renamed extended hearer and footer files 2025-02-13 12:59:31 +00:00
ahmza db813edd8f updated go.mod requirements 2025-02-13 12:59:10 +00:00
ahmza cc33fe5a0b Updated CV 2025-02-04 14:08:45 +00:00
ahmza 29dab701d5 new post 2024-12-02 02:10:02 +00:00
ahmza 85cc9da609 template to be used in obsidian 2024-12-02 02:09:10 +00:00
ahmza 46be4868ab removed featureimage caption, no longer needed 2024-12-02 02:08:44 +00:00
ahmza da5d7afe9e Merge branch 'main' of github.com:ahmzaa/blog-ahmza-com 2024-12-01 08:58:06 +00:00
ahmza a04a8fcc50 updated nginx.conf to have less connections per worker and added webp to compression 2024-12-01 08:55:15 +00:00
ahmza 0759020677 organised and linted all posts
imported workspace into obsidian
linted files
organized yaml frontmatter
unified yaml value formats
removed yaml front matter no longer needed
2024-11-29 02:26:53 +00:00
ahmza c7dac5ea69 Update post "be-more-productive-by-being-bored" 2024-11-16 22:59:03 +00:00
ahmza fa2a096ff3 Update post "test" 2024-11-16 18:39:47 +00:00
ahmza 645c606103 Update post "test" 2024-11-16 15:51:26 +00:00
ahmza ed88fd1019 Update post "test" 2024-11-16 15:50:35 +00:00
ahmza 383885e0a2 Update post "test" 2024-11-16 15:32:43 +00:00
ahmza 56659d245c Update post "test" 2024-11-16 15:31:03 +00:00
ahmza 1d13fcf157 Create post "test" 2024-11-16 15:30:16 +00:00
ahmza 769b06a844 Create post "test3" 2024-11-16 15:27:33 +00:00
ahmza 90d1570193 Delete post "test2" 2024-11-16 15:26:42 +00:00
ahmza bfaaa9e7ed Create post "test2" 2024-11-16 15:25:34 +00:00
ahmza 5b78fc7b8b Update post "test" 2024-11-16 15:24:27 +00:00
ahmza f4f50af288 Update post "test" 2024-11-16 15:15:39 +00:00
ahmza 7aaf8d26dc Create post "test" 2024-11-16 15:14:52 +00:00
ahmza f5aeb40128 Delete post "test" 2024-11-16 15:14:07 +00:00