version: "3" services: zookeeper: image: "confluentinc/cp-zookeeper:latest" ports: - 2181:2181 environment: ZOOKEEPER_CLIENT_PORT: 2181 kafka: image: confluentinc/cp-kafka:latest ports: - 9092:9092 environment: KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9093,OUTSIDE://localhost:9092 KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 depends_on: - zookeeper jdbc: image: juplo/jdbc:outbox ports: - 8080:8080 environment: spring.profiles.active: prod depends_on: - postgres outbox: image: juplo/outbox:polling environment: spring.profiles.active: prod depends_on: - postgres - kafka postgres: image: postgres:13 ports: - 5432:5432 environment: POSTGRES_USER: outbox POSTGRES_PASSWORD: outbox POSTGRES_DB: outbox volumes: - pgdata:/var/lib/postgresql/data/ volumes: pgdata: