aria
Technical notes on web development, DevOps, and AI integration.
11 articles
- 11:52frontend
The Header That Would Not Reach the Edges
The “view as” bar scrolls away and the white header stops short of the column edges. The header had to leave the max-width wrapper, not its margin values.
TL;DR: The sticky manual header was fixed by moving it out of the content wrapper so it spans the full viewport width, using negative margins and matching padding to keep text aligned. The role bar now lives inside that sticky region so it stays reachable while scrolling. Sign-off blocks across three reports were unified into one definition.
#css#sticky#aria - 17:07database
One Dump per Tag: Database Backups That Can Answer
The daily cron dump could not answer which release it matched. Pairing one dump with one release tag made restores a one-name lookup.
TL;DR: Daily cron dumps caused version confusion because the file wasn't tied to the app release. Now each annotated release tag gets its own logical mariadb-dump named to match, stored via documented rules and verified by test restores. This makes recovery predictable since the dump that matches production is instantly clear.
#backup#mariadb#git - 08:10devops
Reviving an Old WordPress Site in Docker: The 301 Trap
Containers healthy, browser dragged to production. Three first-run Docker mechanisms skip old volumes silently, and wp_options holds one more surprise.
TL;DR: Reviving an old WordPress site in Docker, I got redirected to production because stale URLs were baked into wp_options. Docker's first-run scripts silently skip work when old volumes are attached, so restore the database explicitly and fix URLs directly. Scary-looking MariaDB warnings are often harmless; watch the logs patiently before assuming anything is broken.
#docker#wordpress#mariadb - 02:34backend
Semantic Search on a 1GB VPS Without a Vector DB
Pure-Python cosine, vectors in MariaDB postmeta, embeddings computed locally. Semantic features with no new service on a small server.
TL;DR: Running a blog on a 1GB VPS rules out a vector database, so the author computes bge-m3 embeddings locally via Ollama and stores them as JSON in MariaDB postmeta. Related-article matching and dup-checks use pure-Python cosine similarity, fast enough for around 100 articles. Lesson: for small blogs, skip Qdrant or pgvector until scale demands it.
#python#fastapi#embedding - 11:45backend
Twelve entries locally, eight on the VPS
Hand-typed knowledge entries never reached the VPS. A repo-tracked seed file, upserted on every container start, keeps both databases converged.
TL;DR: Hand-typed knowledge entries lived only in the local database, so the VPS was missing four. The fix is a seed file plus a small seeder running on every container start, using INSERT ... ON DUPLICATE KEY UPDATE keyed on slug.
#mariadb#docker#python - 14:34backend
The AI Search Had to Learn Its Own Site
Typing hai used to kill the AI search with no_results. The culprit was MariaDB's fulltext word-length floor, not a broken prompt.
#fastapi#mariadb#llm - 11:12backend
Blog Card TLDR Without N+1 Queries
One tiny field on the list page nearly cost a query per article. The fix is one batch IN query: two queries per page, not 1 + N.
#python#fastapi#mariadb - 10:54backend
SQLAlchemy Rejects a Parameter Your SQL Never Asked For
An optional locale filter froze live search on the default locale. The culprit: bindparams validation that fires at construction, not execution.
#python#fastapi#mariadb - 03:10backend
MariaDB Fulltext Search plus LLM Query Expansion
Replace LIKE with a MariaDB FULLTEXT index, then add LLM query expansion: two layers that keep working when the index or the LLM fails.
#mariadb#fastapi#python