2 Commits

Author SHA1 Message Date
Moko Consulting 00f3d5d6d8 fix(deploy): migrate compose templates to MOKOGIT__ prefix + /data/mokogit mounts [#839 follow-up]
Universal: Auto Version Bump / Version Bump (push) Successful in 11s
Generic: Project CI / Lint & Validate (pull_request) Successful in 28s
Generic: Project CI / Tests (pull_request) Successful in 29s
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Require Docs Update (pull_request) Has been skipped
Universal: PR Check / Wiki Update Reminder (pull_request) Has been skipped
Universal: PR Check / Validate PR (pull_request) Successful in 8s
Universal: PR Check / Secret Scan (pull_request) Successful in 39s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
The image disconnect (#839) renamed the env prefix GITEA__ -> MOKOGIT__ and
moved the custom path to /data/mokogit (MOKOGIT_CUSTOM baked into the image,
no GITEA__ fallback in the binary). The deploy compose templates still used the
old GITEA__ prefix and a single :/data mount, so they produced a forge with no
config. Align dev/rc/prod templates with the validated clean running state:

- Rename all GITEA__section__key -> MOKOGIT__section__key (server + database).
- Replace the single ${GIT_DATA_DIR}:/data bind with the clean 3-mount layout:
  ${GIT_DATA_DIR}:/var/lib/gitea (WorkPath),
  ${GIT_DATA_DIR}:/data/mokogit (CustomPath),
  ${GIT_DATA_DIR}/conf:/data/mokogit/conf (app.ini, child after parent).

Ports, SSH, domain, container_name, image, healthcheck, and all ${GIT_*}
variable names are unchanged. .env.example files reference no GITEA_ vars or
old paths, so they need no changes.

Authored-by: Moko Consulting <hello@mokoconsulting.tech>
2026-07-20 07:37:44 -05:00
jmiller 0cb94ef37d chore(deploy): stage .vault git-stack compose + adopt xx.xx.xx versioning
Repo-only prep to align MokoGIT with the .vault single-source-of-truth structure and the
MokoOrgStandards xx.xx.xx version scheme. No server/.vault changes; relocation coordinated later.

Versioning (replaces leaked Gitea 1.24.0+dev-N-ghash):
- VERSION = 01.00.00 (Makefile STORED_VERSION uses it verbatim on branch builds -> strips the
  git-describe Gitea base; tag builds use the xx.xx.xx tag name).
- VERSIONING.md documents the scheme + how the binary/image version resolves.
- Default the upstream update-checker OFF (modules/setting/setting.go) so the fork never compares
  AppVer against Gitea's release feed.

Staged git-stack compose (target .vault/stacks/git/{prod,rc,dev}):
- deploy/git/{prod,rc,dev}/ each: docker-compose.yml (image mokoconsulting/mokogit per tier tag env
  MOKOGIT[_RC|_DEV]_TAG, containers mokogit/-rc/-dev, /opt/mokogit/{prod,rc,dev} data, host-MySQL
  db mokogit[_rc|_dev], /api/healthz healthcheck), VERSION (01.00.00), .env.example.
- deploy/git/VERSION (per-stack) + README.md (ownership split, reconcile-before-drop, restructure paused).
- Every host/secret value is ${VAR}; modeled on documented live config, marked RECONCILE (diff vs
  the live /opt/mokogitea/docker-compose.yml before dropping into .vault).

Secrets externalized:
- .gitignore now ignores real .env / *.env but keeps *.env.example. No real tokens committed.

Verified: go build ./modules/setting/ ok; .env.example tracked, real .env ignored.
2026-07-16 10:43:18 -05:00