- Go Template 89.1%
- Shell 10.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Replace the stock footer with a git.gay-style one: logo, link columns, "Ran by Insoulum" and the language switcher. Drops the version, page and template timings, which say nothing useful to a visitor. The language menu opens leftwards so it stays inside the viewport. |
||
| overlay | ||
| scripts | ||
| .gitignore | ||
| .rsync-exclude | ||
| docker-compose.yml | ||
| LICENSE | ||
| README.md | ||
Lucario Forge
My personal Git hosting at git.insoulum.ru — a
Forgejo v17 instance with a Lucario theme, a custom home
page and its own logo and favicon.
The theme is called Lucario Dark and comes with a light counterpart,
Lucario White. Both are hand-tuned blue-grey palettes with the Lucario aura
blue (#4a9eff) as the accent.
This repo is a thin customization layer: it holds only the files that differ
from upstream Forgejo. The image itself is the official build, and every change
here is applied to CustomPath at runtime — no image rebuild, no waiting.
Structure
.
├── overlay/ ← copied onto the server's CustomPath
│ ├── templates/ Go templates (override upstream)
│ │ ├── home.tmpl the landing page
│ │ └── base/head_navbar.tmpl navbar (the "Help" item is removed)
│ └── public/assets/ static assets (override upstream)
│ ├── css/
│ │ ├── theme-Lucario Dark.css dark theme
│ │ └── theme-Lucario White.css light theme
│ └── img/
│ ├── logo.svg Lucario logo (navbar, home hero)
│ └── favicon.svg tab icon
├── docker-compose.yml ← container launch + all env + edge_default
├── scripts/
│ ├── deploy.sh ← overlay → server + restart
│ └── pull.sh ← server → overlay (undo drift)
├── LICENSE ← GPL-3.0, inherited from Forgejo
└── .rsync-exclude
How the overlay works
Forgejo resolves templates and static assets through layers: CustomPath first,
then the assets compiled into the binary. So a file placed under CustomPath
silently shadows the built-in one.
On this server CustomPath is /data/gitea, not /data/gitea/custom — that
detail is worth remembering, it cost an evening to find. So:
| Repo path | On the server | Shadows |
|---|---|---|
overlay/templates/home.tmpl |
/data/gitea/templates/home.tmpl |
templates/home.tmpl |
overlay/templates/base/head_navbar.tmpl |
/data/gitea/templates/base/head_navbar.tmpl |
navbar |
overlay/public/assets/css/theme-*.css |
/data/gitea/public/assets/css/ |
theme CSS |
overlay/public/assets/img/*.svg |
/data/gitea/public/assets/img/ |
logo, favicon |
A restart is enough for any of it — Forgejo reads CustomPath at startup. No
image rebuild is involved, ever.
Networking
Forgejo does not publish HTTP. It serves on port 3000 inside
edge_default, and Insoulum-Edge
(the Caddy container) proxies git.insoulum.ru to forgejo:3000.
That network is declared external, so edge must be up first — or at least the network must exist:
docker network create edge_default # only needed on a fresh host
What is published is the built-in SSH server on 2222 (git-shell). Port 22
belongs to the host's sshd, which is why Forgejo does not use it.
Deploy
First deploy (fresh server)
The image is the upstream Forgejo v17 build with the sqlite and
sqlite_unlock_notify tags. Clone it first — do not build straight from a
git URL: make reads the version from VERSION or a git tag, and a URL build
context has no .git, so the build dies at verify-version.
git clone --depth 1 --branch v17.0.2 https://codeberg.org/forgejo/forgejo.git forgejo
cd forgejo
docker build -t insoulum-forgejo:lucario .
--depth 1 is fine: the tag is what git describe needs, not the history.
Ship it, then the overlay:
docker save insoulum-forgejo:lucario | gzip > forgejo.tar.gz
scp forgejo.tar.gz <host>:/opt/forgejo/
rsync -av --exclude-from='.rsync-exclude' ./ <host>:/opt/forgejo/
# On the server — edge must already be running, it owns edge_default
cd /opt/insoulum-edge && docker compose up -d
docker network create edge_default 2>/dev/null || true
cd /opt/forgejo
gunzip -c forgejo.tar.gz | docker load
docker compose up -d
Then copy the overlay into CustomPath once (deploy.sh does exactly this):
LUCARIO_FORGE_HOST=<host> ./scripts/deploy.sh
Updating
Edit anything under overlay/, then:
LUCARIO_FORGE_HOST=insoulum-lv ./scripts/deploy.sh
The script rsyncs the overlay, fixes ownership to 1000:1000 (Forgejo runs as
that uid inside the container) and restarts the container. That's the whole
deploy — seconds, not minutes.
Pulling server changes back
If something was edited directly on the server, don't let the repo drift:
LUCARIO_FORGE_HOST=insoulum-lv ./scripts/pull.sh
git diff
Themes
THEMES in docker-compose.yml is a comma-separated list — it defines which
themes appear in Settings → Appearance. Both Lucario themes are declared
there, and DEFAULT_THEME picks the one guests get.
Theme names are file names: theme-Lucario Dark.css is selected as
Lucario Dark. Spaces are legal — Forgejo URL-escapes them on the way out
(/assets/css/theme-Lucario%20Dark.css).
| Theme | Accent | Scheme |
|---|---|---|
| Lucario Dark | #4a9eff |
dark, blue-grey panels |
| Lucario White | #1f6fc4 |
light, cool grey panels |
The dark theme is built on Forgejo's dark chroma/codemirror/markup styles, the light one on the light ones — code blocks match the rest of the page instead of staying dark in light mode.
Home page
overlay/templates/home.tmpl is a standalone landing page: hero, logo,
"Lucario Forge", a short description and an Explore button.
It must end with {{template "base/footer" .}}. That template closes
</body></html> and loads index.js — omit it and the page renders truncated,
with a header that appears to "drift".
The default footer is hidden on the home page only, scoped with
body:has(.page-content.home), so /explore and every other page keep theirs.
Notes
docker compose restartdoes not re-readdocker-compose.yml. After changing env there, useup -d --force-recreate—restartreuses the old container config.forgejo dumpmust run as thegituser, not root:docker exec -u git forgejo forgejo dump -w /data/gitea -C /data/gitea -c /data/gitea/conf/app.ini -f /data/backup.tar.zst --type tar.zst- Repositories live at
/data/git/repositories([repository] ROOT), not insidegitea/. The directory must exist before the first dump, otherwisedumpaborts onopen /data/git/repositories: no such file or directory. - Registration is disabled and the instance is a single-user one — admin
Insoulum.
Links
- Forgejo — the upstream project
Insoulum-Edge— the Caddy container that terminates TLS and proxiesgit.insoulum.ruhereInsoulum-Web— the static sites served by the same edge
Licenses
- Forgejo and this fork's code — GPL-3.0. As a derivative work it
stays under GPL-3.0; the corresponding source is the upstream v17 tree plus
the files in
overlay/. - Themes, logo and favicon — mine, made for this instance.
- Lucario and Riolu are © Nintendo / Game Freak / Creatures Inc. Unofficial fan project, not affiliated with Nintendo, Game Freak, The Pokémon Company or Mojang/Microsoft.