项目作者: jacksonjesse

项目描述 :
A Docker image for the Google Cloud SDK Pub/Sub Emulator
高级语言: Shell
项目地址: git://github.com/jacksonjesse/pubsub-emulator.git
创建时间: 2020-05-11T22:16:31Z
项目社区:https://github.com/jacksonjesse/pubsub-emulator

开源协议:MIT License

下载


Google Cloud Pub/Sub Emulator

This repository contains configuration for a Docker image that contains the Google Cloud Pub/Sub emulator. It is simply a Dockerised version of https://cloud.google.com/pubsub/docs/emulator.

Usage

Command Line

This shell statement shows the basic usage, which will create a Pub/Sub emulator running on port 8085, with a project name of “testproject”, a default topic of “testtopic” and a subscription of “testsubscription”.

```shell script
docker run —rm —publish 8085:8085 jessejacksondocker/pubsub-emulator:latest

  1. You can also configure the Pub/Sub project name, topic name, subscription name and exposure port:
  2. ```shell script
  3. docker run --rm --env PUBSUB_PROJECT=myproject --env PUBSUB_TOPIC=mytopic --env PUBSUB_SUBSCRIPTION=mysubscription --env PUBSUB_PORT=10101 --publish 10101:10101 jessejacksondocker/pubsub-emulator:latest

Docker Compose

This is the equivalent configuration for docker-compose, with custom environment variables for the project name, topic name, subscription name and Pub/Sub port.

  1. version: '3'
  2. services:
  3. pubsub:
  4. image: jessejacksondocker/pubsub-emulator:latest
  5. ports:
  6. - "10101:10101"
  7. environment:
  8. - PUBSUB_PORT=10101
  9. - PUBSUB_PROJECT=myproject
  10. - PUBSUB_TOPIC=mytopic
  11. - PUBSUB_SUBSCRIPTION=mysubscription