0cb94ef37d
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.
48 lines
1.6 KiB
YAML
48 lines
1.6 KiB
YAML
# MokoGIT git stack -- DEV tier
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
#
|
|
# STAGED for .vault/stacks/git/dev/ -- 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_DEV_TAG}"
|
|
container_name: mokogit-dev
|
|
restart: unless-stopped
|
|
environment:
|
|
- USER_UID=${GIT_UID}
|
|
- USER_GID=${GIT_GID}
|
|
- GITEA__server__DOMAIN=${GIT_DOMAIN}
|
|
- GITEA__server__ROOT_URL=${GIT_ROOT_URL}
|
|
- GITEA__server__SSH_DOMAIN=${GIT_SSH_DOMAIN}
|
|
- GITEA__server__SSH_PORT=${GIT_SSH_PUBLIC_PORT}
|
|
- GITEA__database__DB_TYPE=mysql
|
|
- GITEA__database__HOST=${GIT_DB_HOST}
|
|
- GITEA__database__NAME=${GIT_DB_NAME}
|
|
- GITEA__database__USER=${GIT_DB_USER}
|
|
- GITEA__database__PASSWD=${GIT_DB_PASSWD}
|
|
volumes:
|
|
# RECONCILE: live app.ini at ${GIT_DATA_DIR}/conf/app.ini (/opt/mokogit/dev/conf).
|
|
- "${GIT_DATA_DIR}:/data"
|
|
- /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
|