services:
  debezium-server:
    image: quay.io/debezium/server:2.6.0.Final
    container_name: debezium-server
    ports:
      - 8080:8080
    environment:
      - PUBSUB_EMULATOR_HOST=pubsub:8085
      - PUBSUB_PROJECT_ID=abc
    volumes:
      - $PWD/debezium-server/conf:/debezium/conf
      - $PWD/debezium-server/data:/debezium/data
    depends_on:
      - postgres
      - pubsub
  
  postgres:
    image: quay.io/debezium/example-postgres:latest
    container_name: postgres
    ports:
      - 5432:5432
    environment:
      - POSTGRES_DB=debezium
      - POSTGRES_USER=debezium
      - POSTGRES_PASSWORD=debezium

  
  pubsub:
    container_name: pubsub
    image: gcr.io/google.com/cloudsdktool/google-cloud-cli:414.0.0-emulators
    ports:
      - 8085:8085
    command: 
    - gcloud 
    - beta 
    - emulators 
    - pubsub 
    - start
    - --project=abc
    - --host-port=0.0.0.0:8085


