write-dockerfileslisted
Install: claude install-skill a-novel-kit/stack
# Dockerfile and Compose Writing Skill
This skill governs how to write and maintain container build files for Agora backend services.
All build artifacts live under `builds/`. Read the relevant section for the task at hand; the
conventions at the end apply to every Dockerfile.
**Before writing or editing any Dockerfile**, read the existing files in `builds/`. Every Dockerfile
here follows the same structure — copy it, don't invent a new one.
---
## After Every Edit
Rebuild the affected image after changing any Dockerfile, to catch syntax errors and confirm the
build still succeeds:
```
podman build --format docker -f ./builds/<name>.Dockerfile -t <name>:local .
```
Run `a-novel build --type=podman -y` to rebuild all images at once. Never assume a build is correct
without running it — layer caching can make a previously-failing step appear to succeed on a stale
cache.
---
## Architecture: Service Images vs Job Images
This project separates the main process from maintenance work:
- **Main process images** (`grpc.Dockerfile`, `rest.Dockerfile`): long-running servers, expecting a
fully migrated database before they start. They contain only the server binary and its healthcheck
tool.
- **Job images** (`migrations.Dockerfile`, `rotate-keys.Dockerfile`): short-lived, run-to-completion
containers, run as Kubernetes Jobs or equivalent before the main process starts. They carry only
the binary needed for their single task.
- **Standalone images** (`standalone.grpc.