Files
MokoGIT/deploy/git/rc/docker-compose.yml
Moko Consulting 00f3d5d6d8
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
fix(deploy): migrate compose templates to MOKOGIT__ prefix + /data/mokogit mounts [#839 follow-up]
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

52 lines
1.9 KiB
YAML

# MokoGIT git stack -- RC tier
# SPDX-License-Identifier: GPL-3.0-or-later
#
# STAGED for .vault/stacks/git/rc/ -- see ../README.md. Modeled on the documented live config;
# DIFF against the live /opt/mokogitea/docker-compose.yml before dropping into .vault.
# Every host/secret value is ${VAR} (define real values in a gitignored .env; see .env.example).
services:
git:
image: "${GIT_REGISTRY}/${GIT_IMAGE}:${MOKOGIT_RC_TAG}"
container_name: mokogit-rc
restart: unless-stopped
environment:
- USER_UID=${GIT_UID}
- USER_GID=${GIT_GID}
- MOKOGIT__server__DOMAIN=${GIT_DOMAIN}
- MOKOGIT__server__ROOT_URL=${GIT_ROOT_URL}
- MOKOGIT__server__SSH_DOMAIN=${GIT_SSH_DOMAIN}
- MOKOGIT__server__SSH_PORT=${GIT_SSH_PUBLIC_PORT}
- MOKOGIT__database__DB_TYPE=mysql
- MOKOGIT__database__HOST=${GIT_DB_HOST}
- MOKOGIT__database__NAME=${GIT_DB_NAME}
- MOKOGIT__database__USER=${GIT_DB_USER}
- MOKOGIT__database__PASSWD=${GIT_DB_PASSWD}
volumes:
# RECONCILE: live app.ini at ${GIT_DATA_DIR}/conf/app.ini (/opt/mokogit/rc/conf).
# Clean disconnect layout (#839): MOKOGIT_CUSTOM=/data/mokogit is baked into the image.
# Parent (/data/mokogit) listed before child (/data/mokogit/conf) so Docker attaches it first.
- "${GIT_DATA_DIR}:/var/lib/gitea"
- "${GIT_DATA_DIR}:/data/mokogit"
- "${GIT_DATA_DIR}/conf:/data/mokogit/conf"
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "${GIT_HTTP_PORT}:3000"
- "${GIT_SSH_PORT}:22"
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:3000/api/healthz"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- git
networks:
git:
name: ${GIT_NETWORK}
external: true