# A stand-in for the ERP, for tests only. # # The real source system belongs to another team and is not on this machine, so the product # ships the smallest thing that behaves like it: the same table, the same types, logical # decoding switched on so Debezium can replicate from it, and a seed of rows — including the # rows that must be rejected. # # uv run data-bus fixture up semprini-data-product-templates/source_aligned_cdc_data_product/example # uv run data-bus fixture down ... (removes the volume, so the next start reseeds) # # It joins semprini_bus because that is where bus-connect reaches it. Nothing else may depend # on it: it is not part of the bus stack, and a deployed product points at the real ERP. services: source-{{system}}: image: postgres:17.6-bookworm container_name: source-{{system}} restart: unless-stopped mem_limit: 384m command: - postgres - -c - wal_level=logical # Debezium reads the write-ahead log; without this there is no CDC - -c - max_replication_slots=4 - -c - max_wal_senders=4 environment: POSTGRES_USER: {{system}} POSTGRES_PASSWORD: ${ERP_SOURCE_PASSWORD:-{{system}}} POSTGRES_DB: {{system}} volumes: - ./init:/docker-entrypoint-initdb.d:ro - source-{{system}}-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U {{system}} -d {{system}}"] interval: 5s timeout: 5s retries: 20 logging: driver: json-file options: max-size: "10m" max-file: "2" networks: - bus volumes: source-{{system}}-data: networks: bus: name: semprini_bus # created by semprini-data/stack-data.sh external: true