Commit graph

5 commits

Author SHA1 Message Date
jedarden
7c5abf09b6 fix(ci): enable kafka-sink feature in CI build and Dockerfile
The kafka-sink Cargo feature existed but was not enabled in production builds,
causing all Kafka CDC events to be silently dropped at runtime.

Changes:
- Add --features miroir-core/kafka-sink to cargo-build in miroir-ci.yaml
- Update Dockerfile comments to reflect the expected build commands
- Add kafka_sink_feature.rs integration test with #[cfg(feature = "kafka-sink")]

The test verifies:
- Feature is enabled (compile-time check)
- CdcManager publish works with Kafka config
- Kafka sink config parses correctly

Fixes plan-gap: kafka-sink feature not enabled in CI build and Dockerfile

Bead-Id: bf-4v4rz
2026-05-31 12:08:39 -04:00
jedarden
603b17f708 P8.1: Simplify Dockerfile to scratch-only, update CI to use /workspace/artifacts/
Changes:
- Dockerfile: Remove multi-stage build, now expects pre-built miroir-proxy-linux-amd64
- Dockerfile: Add inline comment documenting the plan §7 cargo-build template
- CI workflow: Change /workspace/dist → /workspace/artifacts to match plan §7
- CI workflow: Update create-github-release to reference /workspace/artifacts

This aligns with plan §7 and §12: scratch base, no libc, minimal attack surface.
The CI builds the static musl binary separately, then Dockerfile copies it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 07:16:34 -04:00
jedarden
3e1451dff1 Multi-stage Dockerfile with musl cross-compilation and .dockerignore
Builder stage compiles both miroir-proxy and miroir-ctl as static musl
binaries, strips them, and copies into a scratch image. Updated
.cargo/config.toml to use target-feature=+crt-static instead of
incorrect CC/CFLAGS. Added .dockerignore to exclude non-essential files.

Image: 4.0 MB compressed (scratch base, single static binary).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 13:47:45 -04:00
jedarden
700bce2bd6 Add Dockerfile for scratch-based miroir-proxy image with musl static binary
FROM scratch image copies stripped static musl binary (4 MB compressed).
Updated .cargo/config.toml with proper musl cross-compilation settings.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 13:31:37 -04:00
jedarden
c5d61b6d17 P8.1: Add scratch-based Dockerfile with OCI labels
- Uses FROM scratch for minimal image size (14.2 MB)
- Includes OCI labels: source, version, revision, licenses
- Exposes ports 7700 (main) and 9090 (metrics)
- Static musl binary for zero libc dependency

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 09:44:40 -04:00