|
| 1 | +# Copilot Instructions — devops-ia/powerpipe |
| 2 | + |
| 3 | +## Project Overview |
| 4 | + |
| 5 | +This repo maintains a community Docker image for [Powerpipe](https://powerpipe.io). Turbot stopped publishing official Docker images, so we build from their pre-compiled binaries. |
| 6 | + |
| 7 | +The image is a thin wrapper: it downloads the Powerpipe binary, sets up the runtime environment (UID 9193, dirs, env vars), and provides a default CMD. |
| 8 | + |
| 9 | +## Architecture |
| 10 | + |
| 11 | +``` |
| 12 | +Dockerfile → builds the image (ARG POWERPIPE_VERSION controls version) |
| 13 | +README.md → documents flags, env vars, quickstart, Kubernetes notes |
| 14 | +cli-snapshot.json → machine-readable snapshot of CLI behavior (auto-generated) |
| 15 | +scripts/ → extraction and comparison tools (do not modify) |
| 16 | +package.json → semantic-release config (do not modify) |
| 17 | +``` |
| 18 | + |
| 19 | +## When Upstream Releases a New Version |
| 20 | + |
| 21 | +1. Review the behavioral diff in the PR comment |
| 22 | +2. Update `README.md`: |
| 23 | + - Add new CLI flags to the flag tables |
| 24 | + - Remove deprecated/removed flags |
| 25 | + - Add new environment variables to the env var table |
| 26 | + - Remove dropped environment variables |
| 27 | + - Update the version in example commands if relevant |
| 28 | +3. Update `Dockerfile`: |
| 29 | + - Add/remove ENV vars if defaults changed |
| 30 | + - Update HEALTHCHECK if the service behavior changed |
| 31 | +4. Do NOT update `ARG POWERPIPE_VERSION` (updatecli handles this) |
| 32 | +5. Do NOT modify `cli-snapshot.json` (CI regenerates it) |
| 33 | + |
| 34 | +## Files You SHOULD Modify |
| 35 | + |
| 36 | +- `README.md` — flag tables, env var tables, examples |
| 37 | +- `Dockerfile` — ENV defaults, HEALTHCHECK, EXPOSE |
| 38 | + |
| 39 | +## Files You MUST NOT Modify |
| 40 | + |
| 41 | +- `.github/workflows/` — CI/CD pipelines |
| 42 | +- `package.json` — semantic-release config |
| 43 | +- `cli-snapshot.json` — auto-generated by CI |
| 44 | +- `scripts/` — extraction tools |
| 45 | +- `LICENSE` |
| 46 | + |
| 47 | +## How to Build and Test |
| 48 | + |
| 49 | +```bash |
| 50 | +# Build |
| 51 | +docker build -t powerpipe:test . |
| 52 | + |
| 53 | +# Smoke test |
| 54 | +docker run --rm powerpipe:test powerpipe --version |
| 55 | + |
| 56 | +# Server test |
| 57 | +docker run --rm -d --name pp-test -p 9033:9033 powerpipe:test powerpipe server |
| 58 | +sleep 5 |
| 59 | +curl -sf http://localhost:9033/ && echo "OK" |
| 60 | +docker stop pp-test |
| 61 | +``` |
| 62 | + |
| 63 | +## Documentation Format |
| 64 | + |
| 65 | +Flag tables use this format: |
| 66 | +```markdown |
| 67 | +| Flag | Description | Default | |
| 68 | +|------|-------------|---------| |
| 69 | +| `--listen` | Listen address (local/network) | `network` | |
| 70 | +``` |
| 71 | + |
| 72 | +Env var tables use this format: |
| 73 | +```markdown |
| 74 | +| Variable | Image default | Description | |
| 75 | +|----------|--------------|-------------| |
| 76 | +| `POWERPIPE_LISTEN` | `network` | Interface to listen on | |
| 77 | +``` |
0 commit comments