문제: High·P1을 고친 뒤에도 P2·P3 약 90건이 남았다. 연결·구독·메시지 크기 상한이 없는 전송(WebSocket·gRPC·GraphQL deadline), 낙관적 충돌의 500, upsert 경쟁, Mongo 무제한 timeout, 샘플 목록 N+1, 갈라진 복사본 (TenantId 3벌, 이벤트 ID 문법 5곳, SQLState 표 2벌), 문서를 읽는 PR 테스트와 캐시를 막는 lane 설정 등이다. 새 기능을 어디에 어떤 순서로 만드는지 알려 주는 문서와 도구가 없었다. MinIO 공식 이미지가 사라져 객체 저장소 lane이 돌지 않았다. 방법: 영역별 묶음으로 실패 테스트를 먼저 쓰고 고쳤다. 고치는 중에 찾은 결함도 함께 고쳤다(durable operation id가 UUIDv4라 이벤트가 전부 DEAD, S3 어댑터 생성·작은 chunk 읽기 실패, Redis 조건부 기록의 EVALSHA 권한). MinIO는 pgsty/minio를 digest로 고정했다(Chainguard는 태그·실행 사용자· mc 이미지 문제로 버림). docs/manual/에 작업 순서와 판단 지점을 쓰고, scripts/new-feature.sh가 5개 leaf에 뼈대를 만든다. 생성→빌드→통과 왕복을 verifyFeatureScaffold가 mainCheck에서 본다. 묶음별 결과와 결정은 리뷰 README 14절에 있다. 위험·한계: 파생 서비스 동작이 바뀐다. JDBC batch 50 기본, 운영 jar에서 H2 제거, 트랜잭션 30초 제한, 격리 수준을 Hikari에서 고정, gRPC· WebSocket·GraphQL 새 한도, correlation ID 규칙 밖이면 서버가 교체, 샘플 키 오류 코드 IDEMPOTENCY_KEY_INVALID. 새 leaf 두 개 (composition:durable-operation, adapter:inbound:messaging)와 새 마이그레이션(postgresql V20·V21, notification V11·V12, sample V8_1, grpc-ledger V002)이 생긴다. V21 유일 인덱스는 기존 중복이 있으면 실패한다(runbook에 확인 쿼리). 검증: ci, mainCheck(생성 명령 왕복 포함), integrationCheck(MinIO 포함 전 컨테이너 lane), -p optional-platforms ci integrationCheck 통과. Refs: docs/reviews/2026-11-01-maturity-review/README.md 14절 BREAKING CHANGE: JDBC batch 기본 켜짐, H2 운영 의존 제거, 트랜잭션 기본 제한 30초, gRPC·WebSocket·GraphQL 서버 한도 기본값 추가, 샘플 Idempotency-Key 오류 코드 변경.
535 lines
21 KiB
YAML
535 lines
21 KiB
YAML
# =============================================================================
|
|
# Shared infrastructure, owned here and nowhere else.
|
|
#
|
|
# Environment overlays (local, dev, prod-smoke) describe how the application runs. This file
|
|
# describes what it runs against. Keeping the two apart is why `local` could stop meaning "the app
|
|
# plus a database" and start meaning "the app, with whichever services the lane asked for".
|
|
#
|
|
# Every service carries a Compose profile, so nothing here starts unless a lane names it. A profile
|
|
# selects services; it never implies a Spring profile. The lane definitions live in
|
|
# src/config/runtime/compose-profile-contracts.json, and scripts/verify-compose-profile-contracts.sh
|
|
# checks this file against them.
|
|
# =============================================================================
|
|
|
|
# The local MinIO runtime, used by the server and by the object-storage smoke client below.
|
|
#
|
|
# It is the image the MinIO qualification lanes measured, by the same digest:
|
|
# src/adapter/outbound/objectstorage/src/test/resources/object-storage/minio-provider-evidence.json
|
|
# records it with the conditional-write findings, and ComposeMinioImageMatchesEvidenceTest in that
|
|
# leaf fails when this default and the evidence disagree. Change both together.
|
|
#
|
|
# Source: pgsty/minio, a community fork on Docker Hub, after Docker Hub's minio/minio and quay.io
|
|
# stopped serving MinIO images (review 05-09). cgr.dev/chainguard/minio measured the same but was
|
|
# not chosen; the evidence file's rejectedCandidates says why. LOCAL_MINIO_IMAGE points this runtime
|
|
# at a mirror; the lanes take OBJECT_STORAGE_MINIO_IMAGE, digest-checked.
|
|
x-local-minio-image: &local-minio-image "${LOCAL_MINIO_IMAGE:-pgsty/minio@sha256:b6bfe7239bfc83fb90d31612d9704d86039dd714f7904b3f1ad68f211e602372}"
|
|
|
|
services:
|
|
# ---- PostgreSQL --------------------------------------------------------------
|
|
db:
|
|
profiles:
|
|
- local-jpa
|
|
- local-messaging-outbox
|
|
- local-notification-ingest
|
|
- local-notification-serving
|
|
- local-notification-handoff
|
|
- shared-infra
|
|
- prod-smoke
|
|
- all-adapters
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: "${POSTGRES_DB:-ca_skeleton}"
|
|
POSTGRES_USER: "${APP_DATASOURCE_USERNAME:-ca_skeleton}"
|
|
POSTGRES_PASSWORD: "${APP_DATASOURCE_PASSWORD:-ca_skeleton}"
|
|
TZ: "UTC"
|
|
volumes:
|
|
- type: volume
|
|
source: caskeleton-db-data
|
|
target: /var/lib/postgresql/data
|
|
ports:
|
|
- "127.0.0.1:5433:5432"
|
|
networks:
|
|
- caskeleton-infra
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"pg_isready -U ${APP_DATASOURCE_USERNAME:-ca_skeleton} -d ${POSTGRES_DB:-ca_skeleton}",
|
|
]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
# ---- MongoDB -----------------------------------------------------------------
|
|
# A replica set of one. Single-node is still a replica set: transactions and change streams need
|
|
# one, and a standalone mongod that "works for reads" is a deployment that discovers the
|
|
# difference at the first transaction.
|
|
mongo:
|
|
profiles:
|
|
- local-mongo
|
|
- all-adapters
|
|
image: mongo:8.0.16
|
|
command: ["mongod", "--replSet", "rs0", "--bind_ip_all"]
|
|
volumes:
|
|
- type: volume
|
|
source: caskeleton-mongo-data
|
|
target: /data/db
|
|
networks:
|
|
- caskeleton-infra
|
|
healthcheck:
|
|
test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping').ok"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 20s
|
|
|
|
mongo-rs-init:
|
|
profiles:
|
|
- local-mongo
|
|
- all-adapters
|
|
image: mongo:8.0.16
|
|
depends_on:
|
|
mongo:
|
|
condition: service_healthy
|
|
# Idempotent: rs.initiate() on an already-initiated set returns an error this swallows, so the
|
|
# lane can be re-run against a surviving volume without a manual reset.
|
|
command:
|
|
- mongosh
|
|
- --host
|
|
- mongo
|
|
- --quiet
|
|
- --eval
|
|
- >-
|
|
try { rs.initiate({_id:'rs0',members:[{_id:0,host:'mongo:27017'}]}) }
|
|
catch (e) { if (!/already initialized/i.test(e.message)) { throw e } }
|
|
networks:
|
|
- caskeleton-infra
|
|
restart: "no"
|
|
|
|
# ---- Kafka -------------------------------------------------------------------
|
|
kafka:
|
|
profiles:
|
|
- local-messaging
|
|
- local-messaging-outbox
|
|
- all-adapters
|
|
image: apache/kafka:3.8.0
|
|
environment:
|
|
KAFKA_NODE_ID: "1"
|
|
KAFKA_PROCESS_ROLES: "broker,controller"
|
|
KAFKA_LISTENERS: "PLAINTEXT://:9092,CONTROLLER://:9093"
|
|
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9092"
|
|
KAFKA_CONTROLLER_QUORUM_VOTERS: "1@kafka:9093"
|
|
KAFKA_CONTROLLER_LISTENER_NAMES: "CONTROLLER"
|
|
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT"
|
|
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1"
|
|
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: "1"
|
|
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: "1"
|
|
networks:
|
|
- caskeleton-infra
|
|
healthcheck:
|
|
test:
|
|
["CMD-SHELL", "/opt/kafka/bin/kafka-broker-api-versions.sh --bootstrap-server kafka:9092"]
|
|
interval: 10s
|
|
timeout: 10s
|
|
retries: 12
|
|
start_period: 30s
|
|
|
|
# ---- Redis — local compose contract for the shipped Redis runtime ----------------
|
|
redis:
|
|
profiles:
|
|
- local-redis
|
|
- all-adapters
|
|
image: redis:7.4
|
|
command: ["redis-server", "--appendonly", "no", "--save", ""]
|
|
networks:
|
|
- caskeleton-infra
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 12
|
|
start_period: 5s
|
|
|
|
# ---- Mailpit — the reference SMTP provider for notification serving ----------
|
|
mailpit:
|
|
profiles:
|
|
- local-notification-serving
|
|
- local-notification-handoff
|
|
- all-adapters
|
|
image: axllent/mailpit:v1.21
|
|
environment:
|
|
MP_SMTP_AUTH_ACCEPT_ANY: "1"
|
|
# MP_SMTP_AUTH_ALLOW_INSECURE is deliberately absent, and Mailpit refuses to start with both:
|
|
# "TLS cannot be required with --smtp-auth-allow-insecure". It existed to permit credentials
|
|
# over a plaintext connection, which is exactly what requiring STARTTLS removes the need for —
|
|
# any AUTH now happens inside the TLS session.
|
|
# STARTTLS, required. Not a hardening extra: SmtpProviderProperties.TlsMode has two members and
|
|
# neither is plaintext, so the platform cannot describe an unencrypted relay at all. A lane that
|
|
# wanted a plaintext Mailpit would be asking for a transport the type refuses to express, and
|
|
# the honest way to satisfy it is to give the relay a certificate.
|
|
MP_SMTP_TLS_CERT: /run/mailpit-tls/server.crt
|
|
MP_SMTP_TLS_KEY: /run/mailpit-tls/server.key
|
|
MP_SMTP_REQUIRE_STARTTLS: "true"
|
|
volumes:
|
|
# Generated per run by the qualification wrapper for the host name `mailpit`, and removed on
|
|
# teardown, exactly like the PostgreSQL lane certificate. A committed test certificate is a
|
|
# private key in Git.
|
|
- type: bind
|
|
source: ./infra/mailpit/tls
|
|
target: /run/mailpit-tls
|
|
read_only: true
|
|
networks:
|
|
- caskeleton-infra
|
|
healthcheck:
|
|
test: ["CMD", "/mailpit", "readyz"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 12
|
|
start_period: 5s
|
|
|
|
# ---- MinIO -------------------------------------------------------------------
|
|
minio:
|
|
profiles:
|
|
- shared-infra
|
|
- prod-smoke
|
|
image: *local-minio-image
|
|
command: ["server", "/data"]
|
|
environment:
|
|
MINIO_ROOT_USER: "${MINIO_ROOT_USER:-caskeleton}"
|
|
MINIO_ROOT_PASSWORD: "${MINIO_ROOT_PASSWORD:-caskeleton-local}"
|
|
volumes:
|
|
- type: volume
|
|
source: caskeleton-minio-data
|
|
target: /data
|
|
networks:
|
|
- caskeleton-infra
|
|
healthcheck:
|
|
test: ["CMD", "mc", "ready", "local"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 10s
|
|
|
|
# Bucket and policy bootstrap. Not a substitute for the round trip: creating a bucket proves the
|
|
# server accepts an admin command, not that an object survives being written and read back.
|
|
minio-init:
|
|
profiles:
|
|
- shared-infra
|
|
- prod-smoke
|
|
# The client from the same supplier as the server. cgr.dev/chainguard/minio-client was not used:
|
|
# it has no shell, and the bootstrap below is a shell script.
|
|
image: "${LOCAL_MINIO_MC_IMAGE:-pgsty/mc@sha256:ce62c9053c69ce12a527a322345b5ad9f44b5f8a7b8189f82e516f2e3f30f1d8}"
|
|
depends_on:
|
|
minio:
|
|
condition: service_healthy
|
|
entrypoint: ["/bin/sh", "/opt/minio/bucket-bootstrap.sh"]
|
|
environment:
|
|
MINIO_ENDPOINT: "http://minio:9000"
|
|
MINIO_ROOT_USER: "${MINIO_ROOT_USER:-caskeleton}"
|
|
MINIO_ROOT_PASSWORD: "${MINIO_ROOT_PASSWORD:-caskeleton-local}"
|
|
MINIO_BUCKET: "${MINIO_BUCKET:-ca-skeleton-objects}"
|
|
volumes:
|
|
- type: bind
|
|
source: ./infra/minio/init
|
|
target: /opt/minio
|
|
read_only: true
|
|
networks:
|
|
- caskeleton-infra
|
|
restart: "no"
|
|
|
|
# ---- Keycloak ----------------------------------------------------------------
|
|
keycloak:
|
|
profiles:
|
|
- local-graphql
|
|
- local-notification-ingest
|
|
- local-notification-serving
|
|
- local-notification-handoff
|
|
- shared-infra
|
|
- prod-smoke
|
|
- all-adapters
|
|
image: quay.io/keycloak/keycloak:26.0
|
|
# The wrapper reads the client secret from a mounted file and execs kc.sh. The realm artifact
|
|
# carries only a ${...} reference, so no secret value is in Git, in the rendered config, or on a
|
|
# command line.
|
|
entrypoint: ["/bin/bash", "/opt/keycloak-entrypoint/entrypoint.sh"]
|
|
environment:
|
|
KC_BOOTSTRAP_ADMIN_USERNAME: "${KEYCLOAK_ADMIN:-admin}"
|
|
KC_BOOTSTRAP_ADMIN_PASSWORD: "${KEYCLOAK_ADMIN_PASSWORD:-admin}"
|
|
KC_HEALTH_ENABLED: "true"
|
|
volumes:
|
|
- type: bind
|
|
source: ./infra/keycloak/entrypoint.sh
|
|
target: /opt/keycloak-entrypoint/entrypoint.sh
|
|
read_only: true
|
|
- type: bind
|
|
source: ./infra/keycloak/realms
|
|
target: /opt/keycloak/data/import
|
|
read_only: true
|
|
secrets:
|
|
- keycloak-graphql-smoke-client-secret
|
|
networks:
|
|
- caskeleton-infra
|
|
healthcheck:
|
|
test:
|
|
- "CMD-SHELL"
|
|
- "exec 3<>/dev/tcp/127.0.0.1/9000 && echo -e 'GET /health/ready HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && cat <&3 | grep -q '\"status\": \"UP\"'"
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 20
|
|
start_period: 30s
|
|
|
|
# ---- Capability schema streams ------------------------------------------------
|
|
# Two pre-start one-shots, in this order, because a capability stream is an operator sequence
|
|
# rather than a property.
|
|
#
|
|
# Install: each stream under db/migration/jpa keeps its own Flyway history table — they all declare
|
|
# a V1, so one Flyway pointed at all of them fails outright — and each registers itself
|
|
# INSTALLED_INACTIVE.
|
|
#
|
|
# Promote: an operator sanctions the installed schema, and the application refuses to start until
|
|
# that has happened. That is the fail-closed half of the same design, so it cannot be folded into
|
|
# the install step without making "the tables exist" and "this is sanctioned" the same event.
|
|
#
|
|
# They are also two images because they must be: flyway/flyway ships no psql, so the promotion
|
|
# could not have run in the migration container at all.
|
|
#
|
|
# Both run before `up`, not with the smoke clients after it — the application is what they are a
|
|
# precondition for. The lane contract's preStartServices carries that ordering.
|
|
db-migrate-capabilities:
|
|
profiles:
|
|
- local-notification-ingest
|
|
- local-notification-serving
|
|
- local-notification-handoff
|
|
- all-adapters
|
|
image: flyway/flyway:11.1.0
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
entrypoint: ["/bin/sh", "/opt/capability-streams/apply-capability-streams.sh"]
|
|
environment:
|
|
PGHOST: "db"
|
|
PGUSER: "${APP_DATASOURCE_USERNAME:-ca_skeleton}"
|
|
PGPASSWORD: "${APP_DATASOURCE_PASSWORD:-ca_skeleton}"
|
|
PGDATABASE: "${POSTGRES_DB:-ca_skeleton}"
|
|
CAPABILITY_STREAMS: "${CAPABILITY_STREAMS:-}"
|
|
volumes:
|
|
- type: bind
|
|
source: ./infra/postgres/apply-capability-streams.sh
|
|
target: /opt/capability-streams/apply-capability-streams.sh
|
|
read_only: true
|
|
# The whole migration tree, not just db/migration/jpa: the application's own postgresql stream
|
|
# has to be installed first, or the capability tables arrive in a schema whose flyway_schema_history
|
|
# does not exist yet and the application refuses to start — which is its baseline-on-migrate: false
|
|
# policy working as designed.
|
|
- type: bind
|
|
source: ./src/adapter/outbound/persistence-jpa/src/main/resources/db/migration
|
|
target: /flyway/sql
|
|
read_only: true
|
|
networks:
|
|
- caskeleton-infra
|
|
restart: "no"
|
|
|
|
db-promote-capabilities:
|
|
profiles:
|
|
- local-notification-ingest
|
|
- local-notification-serving
|
|
- local-notification-handoff
|
|
- all-adapters
|
|
image: postgres:16-alpine
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
entrypoint: ["/bin/sh", "/opt/capability-streams/promote-capability-streams.sh"]
|
|
environment:
|
|
PGHOST: "db"
|
|
PGUSER: "${APP_DATASOURCE_USERNAME:-ca_skeleton}"
|
|
PGPASSWORD: "${APP_DATASOURCE_PASSWORD:-ca_skeleton}"
|
|
PGDATABASE: "${POSTGRES_DB:-ca_skeleton}"
|
|
CAPABILITY_STREAMS: "${CAPABILITY_STREAMS:-}"
|
|
volumes:
|
|
- type: bind
|
|
source: ./infra/postgres/promote-capability-streams.sh
|
|
target: /opt/capability-streams/promote-capability-streams.sh
|
|
read_only: true
|
|
networks:
|
|
- caskeleton-infra
|
|
restart: "no"
|
|
|
|
# The GraphQL transport, as a request. auth-smoke proves a token can be obtained and that public
|
|
# health answers; this proves /graphql is guarded and that an authenticated query executes.
|
|
graphql-smoke:
|
|
profiles:
|
|
- local-graphql
|
|
- all-adapters
|
|
image: curlimages/curl:8.10.1
|
|
depends_on:
|
|
keycloak:
|
|
condition: service_healthy
|
|
# uid 0 for the mounted 0600 client secret, same as auth-smoke.
|
|
user: "0:0"
|
|
entrypoint: ["/bin/sh", "/opt/graphql-smoke/graphql-smoke.sh"]
|
|
environment:
|
|
APP_BASE_URL: "http://app:8080"
|
|
KEYCLOAK_ISSUER: "http://keycloak:8080/realms/ca-skeleton"
|
|
KEYCLOAK_CLIENT_ID: "ca-skeleton-api"
|
|
# Spring for GraphQL serves its own endpoint through a router function rather than an
|
|
# annotated controller, so the presentation base-path prefix does not apply to it.
|
|
GRAPHQL_PATH: "${GRAPHQL_PATH:-/graphql}"
|
|
volumes:
|
|
- type: bind
|
|
source: ./infra/graphql/smoke
|
|
target: /opt/graphql-smoke
|
|
read_only: true
|
|
secrets:
|
|
- keycloak-graphql-smoke-client-secret
|
|
networks:
|
|
- caskeleton-infra
|
|
restart: "no"
|
|
|
|
# ---- One-shot smoke clients --------------------------------------------------
|
|
# Never `up --wait` targets. Each is run with `run --rm` and must exit zero; a missing, skipped or
|
|
# non-zero one fails its lane rather than being treated as "not applicable".
|
|
auth-smoke:
|
|
profiles:
|
|
- local-graphql
|
|
- shared-infra
|
|
- prod-smoke
|
|
- all-adapters
|
|
image: curlimages/curl:8.10.1
|
|
depends_on:
|
|
keycloak:
|
|
condition: service_healthy
|
|
# The client secret is written on the host at mode 0600 by the qualification wrapper and mounted
|
|
# in. The Keycloak image happens to run as the same uid the wrapper writes as; this image runs as
|
|
# uid 100, so it read "Permission denied" and the lane failed on the smoke client rather than on
|
|
# anything it was checking. Compose ignores the secret's uid/gid/mode options outside swarm, so
|
|
# the container reads it as root instead. The two alternatives are both worse: loosening the host
|
|
# file to world-readable leaves a credential readable by every process on the machine, and passing
|
|
# the value as an environment variable puts it in `docker compose config` output and in ps.
|
|
user: "0:0"
|
|
entrypoint: ["/bin/sh", "/opt/auth-smoke/auth-smoke.sh"]
|
|
environment:
|
|
# The same issuer URL the application is given. A token obtained from one URL and validated
|
|
# against another proves nothing, and localhost means a different host inside each container.
|
|
KEYCLOAK_ISSUER: "http://keycloak:8080/realms/ca-skeleton"
|
|
KEYCLOAK_CLIENT_ID: "ca-skeleton-api"
|
|
APP_BASE_URL: "http://app:8080"
|
|
# Supplied per runtime, because the same endpoint has two addresses: application-local.yml
|
|
# pins presentation.api-base-path to /api and the shipped default is /v1. The qualification
|
|
# wrapper exports the value that matches the lane's Spring runtime.
|
|
APP_HEALTH_PATH: "${APP_HEALTH_PATH:-/v1/healthcheck}"
|
|
volumes:
|
|
- type: bind
|
|
source: ./infra/keycloak/smoke
|
|
target: /opt/auth-smoke
|
|
read_only: true
|
|
secrets:
|
|
- keycloak-graphql-smoke-client-secret
|
|
networks:
|
|
- caskeleton-infra
|
|
restart: "no"
|
|
|
|
# The server image, not the mc client image: the mc image ships no sed, grep or cmp, and the round-trip
|
|
# client needs a digest tool. See infra/minio/smoke/object-storage-smoke.sh for how that went
|
|
# unnoticed. The lane already pulls this image for the server itself.
|
|
object-storage-smoke:
|
|
profiles:
|
|
- shared-infra
|
|
- prod-smoke
|
|
image: *local-minio-image
|
|
depends_on:
|
|
minio-init:
|
|
condition: service_completed_successfully
|
|
entrypoint: ["/bin/sh", "/opt/minio-smoke/object-storage-smoke.sh"]
|
|
environment:
|
|
MINIO_ENDPOINT: "http://minio:9000"
|
|
MINIO_ROOT_USER: "${MINIO_ROOT_USER:-caskeleton}"
|
|
MINIO_ROOT_PASSWORD: "${MINIO_ROOT_PASSWORD:-caskeleton-local}"
|
|
MINIO_BUCKET: "${MINIO_BUCKET:-ca-skeleton-objects}"
|
|
volumes:
|
|
- type: bind
|
|
source: ./infra/minio/smoke
|
|
target: /opt/minio-smoke
|
|
read_only: true
|
|
networks:
|
|
- caskeleton-infra
|
|
restart: "no"
|
|
|
|
notification-smoke:
|
|
profiles:
|
|
- local-notification-ingest
|
|
- local-notification-serving
|
|
- local-notification-handoff
|
|
- all-adapters
|
|
image: curlimages/curl:8.10.1
|
|
depends_on:
|
|
keycloak:
|
|
condition: service_healthy
|
|
# uid 0 for the same reason auth-smoke uses it: the mounted client secret is mode 0600 on the
|
|
# host and this image otherwise runs as uid 100, which reads "Permission denied". The lane then
|
|
# fails on the smoke client rather than on anything it was checking.
|
|
user: "0:0"
|
|
entrypoint: ["/bin/sh", "/opt/notification-smoke/notification-smoke.sh"]
|
|
environment:
|
|
APP_BASE_URL: "http://app:8080"
|
|
MAILPIT_BASE_URL: "http://mailpit:8025"
|
|
# ingest | serving | handoff-verify — which phase of the lane this invocation is.
|
|
#
|
|
# No default, deliberately. It defaulted to `ingest`, and local-notification-serving therefore
|
|
# ran the ingest assertions — "accepted, and nothing was delivered" — against an application in
|
|
# SERVING mode. The lane passed while testing the opposite of what it is named for, and would
|
|
# have kept passing for as long as the check happened to run before the dispatch worker. An
|
|
# unset value now renders empty and the client refuses it.
|
|
# `:-` and not a value: an explicit empty default keeps Compose from warning about an unset
|
|
# variable on every lane that never runs this client, while still rendering empty so the
|
|
# client refuses it.
|
|
NOTIFICATION_SMOKE_PHASE: "${NOTIFICATION_SMOKE_PHASE:-}"
|
|
# Submission and template publication are authenticated like every other non-public path, so
|
|
# this client obtains a token the same way auth-smoke does — client credentials against the
|
|
# same issuer URL the application validates against.
|
|
APP_BASE_PATH: "${APP_BASE_PATH:-/api}"
|
|
KEYCLOAK_ISSUER: "http://keycloak:8080/realms/ca-skeleton"
|
|
KEYCLOAK_CLIENT_ID: "ca-skeleton-api"
|
|
volumes:
|
|
- type: bind
|
|
source: ./infra/notification/smoke
|
|
target: /opt/notification-smoke
|
|
read_only: true
|
|
# The handoff lane runs this client twice in one project and the second run needs the request
|
|
# id the first accepted, so the state lives in a named volume that outlives a `run --rm`
|
|
# container and is removed with the project by the teardown's --volumes.
|
|
#
|
|
# Its own path, not a subdirectory of the script mount above: a volume nested inside a
|
|
# read-only bind cannot be created, because the runtime has to mkdir the mountpoint in a
|
|
# filesystem it was just told is read-only.
|
|
- type: volume
|
|
source: caskeleton-notification-smoke-state
|
|
target: /opt/notification-smoke-state
|
|
secrets:
|
|
- keycloak-graphql-smoke-client-secret
|
|
networks:
|
|
- caskeleton-infra
|
|
restart: "no"
|
|
|
|
networks:
|
|
caskeleton-infra:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
caskeleton-notification-smoke-state:
|
|
driver: local
|
|
caskeleton-db-data:
|
|
driver: local
|
|
caskeleton-mongo-data:
|
|
driver: local
|
|
caskeleton-minio-data:
|
|
driver: local
|
|
|
|
secrets:
|
|
# Written per run at mode 0600 by the qualification wrapper and removed on teardown. The realm
|
|
# artifact references it by name; the value never reaches Git, a rendered config, a command line,
|
|
# or an evidence file.
|
|
keycloak-graphql-smoke-client-secret:
|
|
file: ./infra/keycloak/secrets/graphql-smoke-client-secret
|