version: "3"
services:
  kalix-proxy:
    image: gcr.io/kalix-public/kalix-proxy:1.1.17
    command: -Dconfig.resource=dev-mode.conf -Dlogback.configurationFile=logback-dev-mode.xml -Dkalix.proxy.eventing.support=google-pubsub-emulator
    ports:
      - "9000:9000"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    environment:
      USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal}
      USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080}
      PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator
      # Comment to enable ACL check in dev-mode
      # see https://docs.kalix.io/services/using-acls.html#_local_development_with_acls
      ACL_ENABLED: 'false'
      # Uncomment to disable the JWT dev secret
      # JWT_DEV_SECRET: "false"
      # Uncomment to set the JWT dev secret issuer
      # JWT_DEV_SECRET_ISSUER: "my-issuer"
  gcloud-pubsub-emulator:
    image: gcr.io/google.com/cloudsdktool/cloud-sdk:341.0.0
    command: gcloud beta emulators pubsub start --project=test --host-port=0.0.0.0:8085
    ports:
      - 8085:8085
