chore(infra): harden prod images, compose, CI, and dep hygiene (BUNYIP-80) #232
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/bunyip-80-harden-images-compose-ci"
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?
Close the hardening and hygiene gaps the infra/CI/build audit flagged across the production images, compose, CI workflows, and workspace manifests.
appuser(UID 1001) + chown + USER directive and an OCI ARG/LABEL block (GIT_COMMIT/GIT_TAG/BUILD_DATE), mirroringbunyip-api/oci-build/Dockerfile;build-web.ymlnow passes the three build-args likebuild-api.yml.${OIDC_JWT_PRIVATE_KEY_PATH:-/run/secrets/oidc/dev-2026.pem}and drop the runtime-no-opSQLX_OFFLINE=truefrom the api env.rust-toolchain.tomland.cargo/config.tomlto the push paths, and add adocker build --target builderstep mirroringjust check-docker.bun installin the CMD so theweb-node-modulesnamed volume (and the.:/appbind mount) no longer shadow the build-time install, leaving the tailwind CLI missing at runtime.validator0.19 entry (crates pin 0.18 directly), theuuidv7/js features, and thechronowasmbind feature (server-only binary).get-tags.nu: replace the byte-for-byte api/web copies with a single sharedoci-build/get-tags.nu; both build workflows reference it and gained anoci-build/**path trigger.KEY=VALUEso a copied.envis valid; drop the never-referencedFEEDBACK_FORGEJO_REPO/FEEDBACK_FORGEJO_TOKENfrom the root.env.example.AUDIT.md(Dioxus/WASM-era rewire notes, obsolete after the Axum/Maud SSR rewrite) and fix the dangling link indev-docs/milestone-1-handoff.md.Verified in the pinned rust-builder container: fmt --check, clippy -D warnings,
cargo build --workspace --all-targets --locked, andcargo test --workspace --liball green.#BUNYIP-80
Close the hardening and hygiene gaps the infra/CI/build audit flagged across the production images, compose, CI workflows, and workspace manifests. - bunyip-web prod image: add a non-root `appuser` (UID 1001) + chown + USER directive and an OCI ARG/LABEL block (GIT_COMMIT/GIT_TAG/BUILD_DATE), mirroring `bunyip-api/oci-build/Dockerfile`; `build-web.yml` now passes the three build-args like `build-api.yml`. - compose.yml: replace the hardcoded dev OIDC key path with `${OIDC_JWT_PRIVATE_KEY_PATH:-/run/secrets/oidc/dev-2026.pem}` and drop the runtime-no-op `SQLX_OFFLINE=true` from the api env. - check.yml: add `rust-toolchain.toml` and `.cargo/config.toml` to the push paths, and add a `docker build --target builder` step mirroring `just check-docker`. - bunyip-web dev Dockerfile: run `bun install` in the CMD so the `web-node-modules` named volume (and the `.:/app` bind mount) no longer shadow the build-time install, leaving the tailwind CLI missing at runtime. - TLS: move bunyip-domain and bunyip-oidc to reqwest 0.12 with rustls (default-features = false), matching api/web and the rustls-only policy; removes bunyip's own native-tls reqwest. The residual reqwest 0.11/native-tls in the lock is pulled transitively by the dunite git crates and by async-stripe/lettre defaults, outside this repo's manifests. - Workspace deps: drop the unused `validator` 0.19 entry (crates pin 0.18 directly), the `uuid` v7/js features, and the `chrono` wasmbind feature (server-only binary). - Dedup `get-tags.nu`: replace the byte-for-byte api/web copies with a single shared `oci-build/get-tags.nu`; both build workflows reference it and gained an `oci-build/**` path trigger. - bunyip-web/.env.example: convert YAML colon syntax to dotenv `KEY=VALUE` so a copied `.env` is valid; drop the never-referenced `FEEDBACK_FORGEJO_REPO`/`FEEDBACK_FORGEJO_TOKEN` from the root `.env.example`. - Remove the stale `AUDIT.md` (Dioxus/WASM-era rewire notes, obsolete after the Axum/Maud SSR rewrite) and fix the dangling link in `dev-docs/milestone-1-handoff.md`. Verified in the pinned rust-builder container: fmt --check, clippy -D warnings, `cargo build --workspace --all-targets --locked`, and `cargo test --workspace --lib` all green. #BUNYIP-80