Gateway: Dockerfile #9
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Gateway service (see #18). The deliverable of this project is a container
image the owner deploys on their infra.
Task
A
Dockerfileat the repo root followingcoop/hermes-image/Dockerfileconventions (pinned base, comment style explaining each step):
python:3.13-slimwith an exact tag (e.g.-bookwormpin; neverlatest— a Renovate bot bumps base-image pins in this org)uv sync --no-devoruv pip install --system),no build toolchain in the runtime layer
EXPOSE 8000;HEALTHCHECKhitting/healthz(use
python -c "import urllib.request..."if curl is not installed)CMD ["uv", "run", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]Acceptance criteria
docker buildsucceeds;docker runwith the required env vars startsand
/healthzreturns 200; image runs as non-root.Implemented in 078a5cb of coop/apple-music-gateway (Dockerfile + .dockerignore).
python:3.13-slim-bookworm(exact release pin, Renovate-bumpable; neverlatest)ghcr.io/astral-sh/uv:0.11.6image;uv sync --no-dev --frozeninstalls deps — all wheels, no compiler toolchainappuser(uid 10001);/appstays writable so the default./gateway.dbworks (overrideGATEWAY_DB_PATHfor a mounted volume)EXPOSE 8000; HEALTHCHECK probes/healthzwith urllib (slim has no curl)uv run uvicorn --factory app:create_app ...— the issue text saidapp:app, but this codebase exposes an app factory (create_appin app/init.py);app:appwould fail at import, and AGENTS.md already documents--factory app:create_appVerification on this host (no Docker daemon/user namespaces available, so no local
docker build): hadolint clean,uv lock --checkclean, and the exact runtime shape was smoke-tested with production deps only (uv run --no-dev uvicorn --factory app:create_app) —/healthzreturns 200 and the urllib probe used by HEALTHCHECK succeeds. A realdocker buildwill be exercised by the #10 pipeline build once installed.