thermograph/.forgejo/workflows/build.yml
emi 8e9dfa1539 Standalone backend: no-walk paths.py, own Dockerfile, own CI
paths.py drops the sibling-directory walk (backend is now the repo
root, no more frontend/ sibling to walk toward). requirements.txt
drops jinja2/PyYAML (only needed for frontend_ssr's sake in the old
shared monorepo Dockerfile) and fixes stale backend/push.py-style
path comments. New Dockerfile (COPY . /app/, no THERMOGRAPH_SERVICE_ROLE
branch -- this image only ever runs backend) and entrypoint.sh (cd
/app instead of /app/backend). Minimal build.yml: docker build + boot
+ /healthz check.

Verified: image builds and boots standalone (real alembic migration
against SQLite, /healthz and /api/v2/place both 200), full pytest
suite green (301 passed, 4 skipped) against the rewritten paths.py.
2026-07-21 15:58:03 -07:00

43 lines
1.4 KiB
YAML

name: Build + boot check
# Proves the split Dockerfile actually builds and boots standalone (repo-split
# Stage 7b) -- not yet a full pytest-suite migration (that's separate, real
# follow-up work, same category as thermograph-copy's deferred vendoring).
# THERMOGRAPH_FRONTEND_BASE_INTERNAL is required (fails loud if unset) but
# never actually exercised here -- /healthz doesn't go through the
# catch-all proxy, so an unreachable placeholder is fine for this check.
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: docker
steps:
- uses: actions/checkout@v4
- name: Install Docker CLI
run: |
apt-get update -qq
apt-get install -y -qq docker.io
- name: Build
run: docker build -t thermograph-backend:ci .
- name: Boot + health check
run: |
docker run -d --name backend-ci \
-e THERMOGRAPH_FRONTEND_BASE_INTERNAL=http://127.0.0.1:1 \
-p 8137:8137 thermograph-backend:ci
ok=0
for i in $(seq 1 30); do
if curl -fsS -o /dev/null http://127.0.0.1:8137/healthz; then ok=1; break; fi
sleep 1
done
docker logs backend-ci
docker rm -f backend-ci >/dev/null 2>&1 || true
if [ "$ok" != 1 ]; then echo "backend never became healthy"; exit 1; fi
echo "OK: backend booted standalone"