Files
MarioGLealPandClaude Opus 5.5 f5cabd735c
ci / checks (push) Skipped
ci / build (push) Skipped
feat: nuwa-python, the template for a Meru app's repo
A Gitea template repo (D76, option A): Shikigami generates a new app's
repo from it with one API call. .gitea/template names the files and
paths where Gitea expands $REPO_NAME (and _SNAKE for the package);
unknown $names - CI's ${{ }} and shell variables - are left alone.

A FastAPI app with /heartbeat, check.sh (ruff, ty, uv lock, pytest),
Thoth's CI minus the database, Echo's Dockerfile, and deploy/values.yaml
without the deploy/meru.yaml marker: Shikigami adds that last, once the
app's fence, key and build credentials exist, so the template itself is
never deployed. The template repo's own CI is skipped (no runner).

Checked by rendering it as golem and my-app with a stand-in for Gitea's
expansion: check.sh passes on both; golem's image builds and answers
/heartbeat read-only as user 10001.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MdS1HcT3JpVno881Z46fei
2026-10-31 11:25:36 +00:00

15 lines
624 B
Docker

FROM docker.io/library/python:3.15.2-slim@sha256:c4158543ecb725b99e57d129dfd43d761d4c43e4577b5e23326aabb223cf7f4e
COPY --from=ghcr.io/astral-sh/uv:0.13.6@sha256:af22a52f5eafef3d78e551599d405c02df61919d18028f0cea8eda93bc9986d0 /uv /bin/uv
WORKDIR /app
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
COPY src/ src/
# The root filesystem is read-only in Meru, so no .pyc files; the numeric user matches nuwa-app's runAsUser.
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
USER 10001
EXPOSE 8080
CMD [".venv/bin/uvicorn", "--app-dir", "src", "$REPO_NAME_SNAKE.app:app", "--host", "0.0.0.0", "--port", "8080"]