2026-07-23 00:40:13 +00:00
|
|
|
# Boot-smoke harness: run the backend's OWN image against a throwaway TimescaleDB and
|
|
|
|
|
# assert it actually boots + serves its contract (build alone doesn't prove boot). Used
|
|
|
|
|
# by scripts/smoke.sh; not a deploy file. DB data is tmpfs (ephemeral) — no volume, no
|
|
|
|
|
# residue. See Makefile `smoke` and README.
|
|
|
|
|
services:
|
|
|
|
|
db:
|
|
|
|
|
image: timescale/timescaledb:${TIMESCALEDB_TAG:-latest-pg18}
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: thermograph
|
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-smoke}
|
|
|
|
|
POSTGRES_DB: thermograph
|
|
|
|
|
tmpfs:
|
|
|
|
|
# pg18 images place PGDATA in a major-version subdir under the mount, so mount at
|
|
|
|
|
# /var/lib/postgresql (matches the infra compose), not /var/lib/postgresql/data.
|
|
|
|
|
- /var/lib/postgresql
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U thermograph -d thermograph"]
|
|
|
|
|
interval: 3s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 20
|
|
|
|
|
|
|
|
|
|
backend:
|
|
|
|
|
# Defaults to a locally-built `:local` image (scripts/smoke.sh builds it). In CI,
|
|
|
|
|
# set BACKEND_IMAGE_TAG=sha-<12hex> to smoke the exact published image.
|
2026-07-31 03:53:26 +00:00
|
|
|
# The path must match what build-push.yml publishes -- jinemi/thermograph/backend.
|
|
|
|
|
# It read admin_emi/thermograph-backend/app (the retired split-era path) until this
|
2026-07-25 21:11:32 +00:00
|
|
|
# was corrected; harmless for the default `:local` build, wrong the moment
|
|
|
|
|
# BACKEND_IMAGE_TAG names a real published tag.
|
registry: move the registry host to dev.jinemi.com, MCP to mcp.jinemi.com
Completes the Forgejo domain migration. ROOT_URL moved to dev.jinemi.com
earlier; the registry half was deliberately deferred. Every image name,
REGISTRY_HOST default, runner label and --add-host pin now names
dev.jinemi.com, so the registry host and the bearer-token realm agree again.
Both names address the same Forgejo, so no image needs re-pushing and a
rollback to a tag pushed under the old prefix still resolves.
git.thermograph.org therefore stays served off the same Caddy site block --
one block, so the /v2/* mesh-only matcher keeps covering both names -- for
pre-migration tags and for runners holding it as their registered instance
URL.
Mesh clients now pin both names in /etc/hosts: the new one as registry host
and token realm, the old one for pre-migration tags. runner-vps2/config.yaml
carries both --add-host entries for the same reason.
Also renames Centralis' endpoint to mcp.jinemi.com in the two places this
repo names it; Centralis itself is provisioned outside this repo.
Host-side steps this cannot do (documented in deploy/forgejo/README.md,
"Host-side steps"): the Forgejo Actions variable REGISTRY_HOST, docker login
against the new host, and the /etc/hosts pins.
2026-08-01 23:06:22 +00:00
|
|
|
image: ${REGISTRY_HOST:-dev.jinemi.com}/${BACKEND_IMAGE_PATH:-jinemi/thermograph/backend}:${BACKEND_IMAGE_TAG:-local}
|
2026-07-23 00:40:13 +00:00
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
environment:
|
|
|
|
|
THERMOGRAPH_DATABASE_URL: postgresql+asyncpg://thermograph:${POSTGRES_PASSWORD:-smoke}@db:5432/thermograph
|
|
|
|
|
# Required at import (web/app.py). The smoke never exercises a proxied page, so an
|
|
|
|
|
# unreachable placeholder is fine — it only hits /healthz and {BASE}/api/version.
|
|
|
|
|
THERMOGRAPH_FRONTEND_BASE_INTERNAL: http://127.0.0.1:1
|
|
|
|
|
THERMOGRAPH_BASE: "/"
|
|
|
|
|
THERMOGRAPH_ENABLE_NOTIFIER: "0"
|
2026-07-25 04:13:47 +00:00
|
|
|
THERMOGRAPH_ENABLE_HEARTBEAT: "0"
|
2026-07-23 00:40:13 +00:00
|
|
|
PORT: "8137"
|
|
|
|
|
WORKERS: "1"
|
|
|
|
|
ports:
|
|
|
|
|
# Host port defaults to 18137 to avoid colliding with a running dev server on 8137.
|
|
|
|
|
- "127.0.0.1:${SMOKE_HOST_PORT:-18137}:8137"
|