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

Set custom host via docker param or query string

Open jonfinerty opened this issue 8 months ago • 3 comments

Hi, thanks for adding the ability to change host in the UI in #19. I have a very similar use case to #13 and I'd love to point the pubsub UI directly to the desired port on start up rather than needing to remind other developers in my org to update the setting in the UI as that's easy to forget to do.

What would be fantastic is if I could either set this when running the docker container as a parameter, or in a query string like &host=localhost:8099. So I can automate this configuration away for my end users.

jonfinerty avatar Aug 06 '25 08:08 jonfinerty

Hmm this query string idea might be very good. From my understanding the env var option listed in #26 does not really work since angular cant pull environment variables during run time without some significant changes. I was playing around with building a cli tool for pubsub emulator that this UI would tap into, but let me take a shot at just doing it via query params. I'll try it and get back to ya if it works 👍

NeoScript avatar Aug 06 '25 21:08 NeoScript

I've had a go at this myself: https://github.com/NeoScript/pubsub-emulator-ui/pull/39

jonfinerty avatar Aug 19 '25 13:08 jonfinerty

Had a go at the PROJECT_ID env-var, as well as auto-attach projects with this PR: https://github.com/NeoScript/pubsub-emulator-ui/pull/41 -- should be a repeatable pattern for other config-type things that need to be injected in later.

jzaleski avatar Nov 06 '25 22:11 jzaleski