pubsub-emulator-ui icon indicating copy to clipboard operation
pubsub-emulator-ui copied to clipboard

docker-compose options

Open LegendSebastiano-L opened this issue 1 year ago • 4 comments

hey 👋

I have a docker-compose that spin up everything, just a bit different from your example

  # PubSub
  pubsub:
    image: google/cloud-sdk:emulators
    container_name: pubsub
    command: bash -c "gcloud beta emulators pubsub start --project=some-project-id --host-port='0.0.0.0:8085'"
    volumes: 
      - pubsub_data:/opt/data
    ports:
      - "8085:8085"
    networks:
      - app-network
  • is there a way to specify the port where the PubSub is running in this emulator UI?
  • is there a volume I can attach to it and name it? like I did in the cloud-sdk image

LegendSebastiano-L avatar Dec 26 '24 18:12 LegendSebastiano-L

Hello! I did not know we could use this official image for emulators, very cool I will look into it. Currently I have only used the pubsub emulator image specified in the docker-compose.yml file (root of repo).

You can indeed specify a host and port for the pubsub emulator via the UI. Just click this little gear icon in the top right of navbar: image

No current support for volumes, however I may explore adding some use for it to store things like projects/subscriptions/automatic scripts/etc. Currently it stores the project names via cookies on browser.

NeoScript avatar Jan 11 '25 05:01 NeoScript

Thanks for the info :)

I see that you have a PR open to set the host via an ENV, which would be great so that we don't have to set it up all the time :)

I haven't fully tested this UI with the images I wrote above, though I was able to create some subscriptions via this UI without any problem, so I guess it should work fine

LegendSebastiano-L avatar Jan 11 '25 13:01 LegendSebastiano-L

Any plans to add this via env?

tobiastornros avatar Mar 18 '25 20:03 tobiastornros

Have a suggestion in this PR #26

thallesdaniell avatar May 31 '25 13:05 thallesdaniell